{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "%matplotlib inline\n",
    "import pandas as pd\n",
    "idx = pd.IndexSlice"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<style>body {\n",
       "    margin: 0;\n",
       "    font-family: Helvetica;\n",
       "}\n",
       "table.dataframe {\n",
       "    border-collapse: collapse;\n",
       "    border: none;\n",
       "}\n",
       "table.dataframe tr {\n",
       "    border: none;\n",
       "}\n",
       "table.dataframe td, table.dataframe th {\n",
       "    margin: 0;\n",
       "    border: 1px solid white;\n",
       "    padding-left: 0.25em;\n",
       "    padding-right: 0.25em;\n",
       "}\n",
       "table.dataframe th:not(:empty) {\n",
       "    background-color: #fec;\n",
       "    text-align: left;\n",
       "    font-weight: normal;\n",
       "}\n",
       "table.dataframe tr:nth-child(2) th:empty {\n",
       "    border-left: none;\n",
       "    border-right: 1px dashed #888;\n",
       "}\n",
       "table.dataframe td {\n",
       "    border: 2px solid #ccf;\n",
       "    background-color: #f4f4ff;\n",
       "}\n",
       "h3 {\n",
       "    color: white;\n",
       "    background-color: black;\n",
       "    padding: 0.5em;\n",
       "}\n",
       "</style>"
      ],
      "text/plain": [
       "<IPython.core.display.HTML object>"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "from IPython.core.display import HTML\n",
    "css = open('style-table.css').read() + open('style-notebook.css').read()\n",
    "HTML('<style>{}</style>'.format(css))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 13.9 s, sys: 1.54 s, total: 15.4 s\n",
      "Wall time: 16.1 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "cast = pd.DataFrame.from_csv('data/cast.csv', index_col=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>The Core</td>\n",
       "      <td>2003</td>\n",
       "      <td>Alejandro Abellan</td>\n",
       "      <td>actor</td>\n",
       "      <td>U.S.S. Soldier</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Il momento di uccidere</td>\n",
       "      <td>1968</td>\n",
       "      <td>Remo De Angelis</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Across the Divide</td>\n",
       "      <td>1921</td>\n",
       "      <td>Thomas Delmar</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Revan</td>\n",
       "      <td>2012</td>\n",
       "      <td>Diego James</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Un homme marche dans la ville</td>\n",
       "      <td>1950</td>\n",
       "      <td>Fabien Loris</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                           title  year               name   type  \\\n",
       "0                       The Core  2003  Alejandro Abellan  actor   \n",
       "1         Il momento di uccidere  1968    Remo De Angelis  actor   \n",
       "2              Across the Divide  1921      Thomas Delmar  actor   \n",
       "3                          Revan  2012        Diego James  actor   \n",
       "4  Un homme marche dans la ville  1950       Fabien Loris  actor   \n",
       "\n",
       "        character   n  \n",
       "0  U.S.S. Soldier NaN  \n",
       "1            Dago   9  \n",
       "2            Dago   4  \n",
       "3            Dago NaN  \n",
       "4            Dago  12  "
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cast.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 1.78 s, sys: 76.5 ms, total: 1.85 s\n",
      "Wall time: 1.93 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "release_dates = pd.read_csv('data/release_dates.csv', index_col=None,\n",
    "                            parse_dates=['date'], infer_datetime_format=True)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>country</th>\n",
       "      <th>date</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0_1_0</td>\n",
       "      <td>2008</td>\n",
       "      <td>Poland</td>\n",
       "      <td>2008-11-14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Ai no Sanka</td>\n",
       "      <td>1967</td>\n",
       "      <td>Japan</td>\n",
       "      <td>1967-01-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>A Thousand to One</td>\n",
       "      <td>1920</td>\n",
       "      <td>USA</td>\n",
       "      <td>1920-12-05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>A Prince of a King</td>\n",
       "      <td>1923</td>\n",
       "      <td>USA</td>\n",
       "      <td>1923-10-13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>A Prince of a King</td>\n",
       "      <td>1923</td>\n",
       "      <td>Netherlands</td>\n",
       "      <td>1924-08-08</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                title  year      country       date\n",
       "0               0_1_0  2008       Poland 2008-11-14\n",
       "1         Ai no Sanka  1967        Japan 1967-01-01\n",
       "2   A Thousand to One  1920          USA 1920-12-05\n",
       "3  A Prince of a King  1923          USA 1923-10-13\n",
       "4  A Prince of a King  1923  Netherlands 1924-08-08"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "release_dates.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>The Core</td>\n",
       "      <td>2003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Il momento di uccidere</td>\n",
       "      <td>1968</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Across the Divide</td>\n",
       "      <td>1921</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Revan</td>\n",
       "      <td>2012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Un homme marche dans la ville</td>\n",
       "      <td>1950</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                           title  year\n",
       "0                       The Core  2003\n",
       "1         Il momento di uccidere  1968\n",
       "2              Across the Divide  1921\n",
       "3                          Revan  2012\n",
       "4  Un homme marche dans la ville  1950"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "titles = cast[['title', 'year']].drop_duplicates().reset_index(drop=True)\n",
    "titles.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Years"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "214386"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. How many movies are listed in the `titles` dataframe?\n",
    "\n",
    "len(titles)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>100983</th>\n",
       "      <td>Miss Jerry</td>\n",
       "      <td>1894</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "             title  year\n",
       "100983  Miss Jerry  1894"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. What is the name and year of the very first movie ever made?\n",
    "\n",
    "titles.sort_values('year').head(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>208386</th>\n",
       "      <td>The Understander</td>\n",
       "      <td>2021</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>200027</th>\n",
       "      <td>Model Combat</td>\n",
       "      <td>2021</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>208929</th>\n",
       "      <td>Edge of Time</td>\n",
       "      <td>2021</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                   title  year\n",
       "208386  The Understander  2021\n",
       "200027      Model Combat  2021\n",
       "208929      Edge of Time  2021"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. How many years into the future does the IMDB database list movie titles?\n",
    "\n",
    "titles.sort_values('year').tail(3)#.year - 2015"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1158"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. How many movies listed in `titles` came out in 1950?\n",
    "\n",
    "len(titles[titles.year == 1950])\n",
    "\n",
    "# or: (titles.year == 1950).sum()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1441"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. How many movies came out in 1960?\n",
    "\n",
    "len(titles[titles.year == 1960])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1970 1876\n",
      "1971 1774\n",
      "1972 1840\n",
      "1973 1813\n",
      "1974 1795\n",
      "1975 1704\n",
      "1976 1716\n",
      "1977 1686\n",
      "1978 1679\n",
      "1979 1757\n"
     ]
    }
   ],
   "source": [
    "# 1. How many movies came out in each year of the 1970s?\n",
    "#    (Hint: try a Python \"for\" loop.)\n",
    "\n",
    "for y in range(1970, 1980):\n",
    "    print(y, (titles.year == y).sum())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "127060"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. How many movies came out during your own lifetime,\n",
    "#    from the year of your birth through 2014?\n",
    "\n",
    "len(titles[(titles.year >= 1974) & (titles.year <= 2014)])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1970    1876\n",
       "1971    1774\n",
       "1972    1840\n",
       "1973    1813\n",
       "1974    1795\n",
       "1975    1704\n",
       "1976    1716\n",
       "1977    1686\n",
       "1978    1679\n",
       "1979    1757\n",
       "dtype: int64"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. Use \"value_counts\" to determine how many movies came out\n",
    "#    in each year of the 1970s.\n",
    "\n",
    "titles[titles.year // 10 == 197].year.value_counts().sort_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "year\n",
       "1970    1876\n",
       "1971    1774\n",
       "1972    1840\n",
       "1973    1813\n",
       "1974    1795\n",
       "1975    1704\n",
       "1976    1716\n",
       "1977    1686\n",
       "1978    1679\n",
       "1979    1757\n",
       "dtype: int64"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 3. Use \"groupby\" to determine how many movies came out in each year of the 1970s.\n",
    "\n",
    "titles.groupby('year').size().loc[1970:1979]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "### Titles"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>100983</th>\n",
       "      <td>Miss Jerry</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>104766</th>\n",
       "      <td>Soldiers of the Cross</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>140912</th>\n",
       "      <td>Can Can</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>142404</th>\n",
       "      <td>The Story of the Kelly Gang</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>173490</th>\n",
       "      <td>Jeffries-Sharkey Contest</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>173746</th>\n",
       "      <td>Valsons</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>173859</th>\n",
       "      <td>The Joe Gans-Battling Nelson Fight</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>174032</th>\n",
       "      <td>Battle of Jeffries and Sharkey for Championshi...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>174343</th>\n",
       "      <td>Sr. Wrangler Mr. R.P. Paranjpe</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>205246</th>\n",
       "      <td>Lika mot lika</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>211338</th>\n",
       "      <td>Eine Fliegenjagd oder Die Rache der Frau Schultze</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                    title\n",
       "100983                                         Miss Jerry\n",
       "104766                              Soldiers of the Cross\n",
       "140912                                            Can Can\n",
       "142404                        The Story of the Kelly Gang\n",
       "173490                           Jeffries-Sharkey Contest\n",
       "173746                                            Valsons\n",
       "173859                 The Joe Gans-Battling Nelson Fight\n",
       "174032  Battle of Jeffries and Sharkey for Championshi...\n",
       "174343                     Sr. Wrangler Mr. R.P. Paranjpe\n",
       "205246                                      Lika mot lika\n",
       "211338  Eine Fliegenjagd oder Die Rache der Frau Schultze"
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. What are the names of the movies made through 1906?\n",
    "\n",
    "titles[titles.year <= 1906][['title']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2056</th>\n",
       "      <td>Star Wars</td>\n",
       "      <td>1977</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9814</th>\n",
       "      <td>Star Trek</td>\n",
       "      <td>2009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>9886</th>\n",
       "      <td>Star Trek Into Darkness</td>\n",
       "      <td>2013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>27553</th>\n",
       "      <td>Star Trek III: The Search for Spock</td>\n",
       "      <td>1984</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>29784</th>\n",
       "      <td>Star Trek: The Wrath of Khan</td>\n",
       "      <td>1982</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>30814</th>\n",
       "      <td>Star Trek: The Motion Picture</td>\n",
       "      <td>1979</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>33378</th>\n",
       "      <td>Star Trek: Nemesis</td>\n",
       "      <td>2002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39810</th>\n",
       "      <td>Star Trek: First Contact</td>\n",
       "      <td>1996</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>39824</th>\n",
       "      <td>Star Trek: Generations</td>\n",
       "      <td>1994</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>59379</th>\n",
       "      <td>Star Trek VI: The Undiscovered Country</td>\n",
       "      <td>1991</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>60607</th>\n",
       "      <td>Star Trek IV: The Voyage Home</td>\n",
       "      <td>1986</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>70841</th>\n",
       "      <td>Star Trek V: The Final Frontier</td>\n",
       "      <td>1989</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>92631</th>\n",
       "      <td>Star Trip</td>\n",
       "      <td>2012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>103945</th>\n",
       "      <td>Star Trek World Tour</td>\n",
       "      <td>1998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>104399</th>\n",
       "      <td>Star Trek: Insurrection</td>\n",
       "      <td>1998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>130495</th>\n",
       "      <td>Star Vehicle</td>\n",
       "      <td>2010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>144886</th>\n",
       "      <td>Star Trek: Temporal Anomaly</td>\n",
       "      <td>2015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>178385</th>\n",
       "      <td>Star Trek I: Specter of the Past</td>\n",
       "      <td>2010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>180027</th>\n",
       "      <td>Star Trek: Horizon</td>\n",
       "      <td>2015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>199493</th>\n",
       "      <td>Star Trek: Operation Beta Shield</td>\n",
       "      <td>2008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>209496</th>\n",
       "      <td>Star Trek: USS PAN</td>\n",
       "      <td>2018</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                         title  year\n",
       "2056                                 Star Wars  1977\n",
       "9814                                 Star Trek  2009\n",
       "9886                   Star Trek Into Darkness  2013\n",
       "27553      Star Trek III: The Search for Spock  1984\n",
       "29784             Star Trek: The Wrath of Khan  1982\n",
       "30814            Star Trek: The Motion Picture  1979\n",
       "33378                       Star Trek: Nemesis  2002\n",
       "39810                 Star Trek: First Contact  1996\n",
       "39824                   Star Trek: Generations  1994\n",
       "59379   Star Trek VI: The Undiscovered Country  1991\n",
       "60607            Star Trek IV: The Voyage Home  1986\n",
       "70841          Star Trek V: The Final Frontier  1989\n",
       "92631                                Star Trip  2012\n",
       "103945                    Star Trek World Tour  1998\n",
       "104399                 Star Trek: Insurrection  1998\n",
       "130495                            Star Vehicle  2010\n",
       "144886             Star Trek: Temporal Anomaly  2015\n",
       "178385        Star Trek I: Specter of the Past  2010\n",
       "180027                      Star Trek: Horizon  2015\n",
       "199493        Star Trek: Operation Beta Shield  2008\n",
       "209496                      Star Trek: USS PAN  2018"
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. What movies have titles that fall between Star Trek and Star Wars in the alphabet?\n",
    "\n",
    "titles[(titles.title >= 'Star Trek') & (titles.title <= 'Star Wars')]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>title</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Star Trek</th>\n",
       "      <td>2009</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek I: Specter of the Past</th>\n",
       "      <td>2010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek III: The Search for Spock</th>\n",
       "      <td>1984</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek IV: The Voyage Home</th>\n",
       "      <td>1986</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek Into Darkness</th>\n",
       "      <td>2013</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek V: The Final Frontier</th>\n",
       "      <td>1989</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek VI: The Undiscovered Country</th>\n",
       "      <td>1991</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek World Tour</th>\n",
       "      <td>1998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: First Contact</th>\n",
       "      <td>1996</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: Generations</th>\n",
       "      <td>1994</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: Horizon</th>\n",
       "      <td>2015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: Insurrection</th>\n",
       "      <td>1998</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: Nemesis</th>\n",
       "      <td>2002</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: Operation Beta Shield</th>\n",
       "      <td>2008</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: Temporal Anomaly</th>\n",
       "      <td>2015</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: The Motion Picture</th>\n",
       "      <td>1979</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: The Wrath of Khan</th>\n",
       "      <td>1982</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trek: USS PAN</th>\n",
       "      <td>2018</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Trip</th>\n",
       "      <td>2012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Vehicle</th>\n",
       "      <td>2010</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars</th>\n",
       "      <td>1977</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                        year\n",
       "title                                       \n",
       "Star Trek                               2009\n",
       "Star Trek I: Specter of the Past        2010\n",
       "Star Trek III: The Search for Spock     1984\n",
       "Star Trek IV: The Voyage Home           1986\n",
       "Star Trek Into Darkness                 2013\n",
       "Star Trek V: The Final Frontier         1989\n",
       "Star Trek VI: The Undiscovered Country  1991\n",
       "Star Trek World Tour                    1998\n",
       "Star Trek: First Contact                1996\n",
       "Star Trek: Generations                  1994\n",
       "Star Trek: Horizon                      2015\n",
       "Star Trek: Insurrection                 1998\n",
       "Star Trek: Nemesis                      2002\n",
       "Star Trek: Operation Beta Shield        2008\n",
       "Star Trek: Temporal Anomaly             2015\n",
       "Star Trek: The Motion Picture           1979\n",
       "Star Trek: The Wrath of Khan            1982\n",
       "Star Trek: USS PAN                      2018\n",
       "Star Trip                               2012\n",
       "Star Vehicle                            2010\n",
       "Star Wars                               1977"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. Use an index and .loc[] to find the movies whose titles fall between Star Trek\n",
    "#    and Star Wars in the alphabet.\n",
    "\n",
    "t = titles.copy()\n",
    "t = t.set_index('title').sort_index()\n",
    "t.loc['Star Trek':'Star Wars']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1894</th>\n",
       "      <td>Miss Jerry</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1898</th>\n",
       "      <td>Can Can</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1899</th>\n",
       "      <td>Jeffries-Sharkey Contest</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1899</th>\n",
       "      <td>Battle of Jeffries and Sharkey for Championshi...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1900</th>\n",
       "      <td>Soldiers of the Cross</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1902</th>\n",
       "      <td>Sr. Wrangler Mr. R.P. Paranjpe</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1905</th>\n",
       "      <td>Valsons</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1905</th>\n",
       "      <td>Eine Fliegenjagd oder Die Rache der Frau Schultze</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1906</th>\n",
       "      <td>The Story of the Kelly Gang</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1906</th>\n",
       "      <td>The Joe Gans-Battling Nelson Fight</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1906</th>\n",
       "      <td>Lika mot lika</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                  title\n",
       "year                                                   \n",
       "1894                                         Miss Jerry\n",
       "1898                                            Can Can\n",
       "1899                           Jeffries-Sharkey Contest\n",
       "1899  Battle of Jeffries and Sharkey for Championshi...\n",
       "1900                              Soldiers of the Cross\n",
       "1902                     Sr. Wrangler Mr. R.P. Paranjpe\n",
       "1905                                            Valsons\n",
       "1905  Eine Fliegenjagd oder Die Rache der Frau Schultze\n",
       "1906                        The Story of the Kelly Gang\n",
       "1906                 The Joe Gans-Battling Nelson Fight\n",
       "1906                                      Lika mot lika"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. Use an index and .loc[] to retrieve the names of the movies made through 1906.\n",
    "\n",
    "titles.set_index('year').sort_index().loc[1800:1906]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Hamlet           17\n",
       "Macbeth          14\n",
       "Carmen           14\n",
       "Anna Karenina    12\n",
       "Maya             11\n",
       "Underground      11\n",
       "Anna             10\n",
       "Revenge          10\n",
       "Temptation       10\n",
       "The Outsider     10\n",
       "Jackpot          10\n",
       "Othello          10\n",
       "Blood Money      10\n",
       "She              10\n",
       "Rage              9\n",
       "dtype: int64"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. What are the 15 most common movie titles in film history?\n",
    "\n",
    "titles.title.value_counts().head(15)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# Use this for session 3?\n",
    "\n",
    "i = cast.set_index('name').sort_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"3\" halign=\"left\">n</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th>min</th>\n",
       "      <th>mean</th>\n",
       "      <th>max</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1932</th>\n",
       "      <td>1</td>\n",
       "      <td>5.125000</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1933</th>\n",
       "      <td>1</td>\n",
       "      <td>3.166667</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1934</th>\n",
       "      <td>1</td>\n",
       "      <td>1.500000</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1935</th>\n",
       "      <td>1</td>\n",
       "      <td>1.750000</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1936</th>\n",
       "      <td>1</td>\n",
       "      <td>1.750000</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1937</th>\n",
       "      <td>2</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1938</th>\n",
       "      <td>2</td>\n",
       "      <td>2.000000</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1939</th>\n",
       "      <td>1</td>\n",
       "      <td>1.333333</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1940</th>\n",
       "      <td>1</td>\n",
       "      <td>1.250000</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1941</th>\n",
       "      <td>1</td>\n",
       "      <td>1.500000</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1942</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1943</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1944</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1945</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1946</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1947</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1949</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1950</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1951</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1952</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1953</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1955</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1957</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1958</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1959</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1960</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1962</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1963</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1966</th>\n",
       "      <td>1</td>\n",
       "      <td>1.000000</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1981</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1987</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1988</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2002</th>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "       n              \n",
       "     min      mean max\n",
       "year                  \n",
       "1932   1  5.125000   9\n",
       "1933   1  3.166667  10\n",
       "1934   1  1.500000   2\n",
       "1935   1  1.750000   2\n",
       "1936   1  1.750000   3\n",
       "1937   2  2.000000   2\n",
       "1938   2  2.000000   2\n",
       "1939   1  1.333333   2\n",
       "1940   1  1.250000   2\n",
       "1941   1  1.500000   2\n",
       "1942   1  1.000000   1\n",
       "1943   1  1.000000   1\n",
       "1944   1  1.000000   1\n",
       "1945 NaN       NaN NaN\n",
       "1946   1  1.000000   1\n",
       "1947   1  1.000000   1\n",
       "1948   1  1.000000   1\n",
       "1949   1  1.000000   1\n",
       "1950   1  1.000000   1\n",
       "1951   1  1.000000   1\n",
       "1952   1  1.000000   1\n",
       "1953   1  1.000000   1\n",
       "1955   1  1.000000   1\n",
       "1957   1  1.000000   1\n",
       "1958   1  1.000000   1\n",
       "1959   1  1.000000   1\n",
       "1960   1  1.000000   1\n",
       "1962   1  1.000000   1\n",
       "1963   1  1.000000   1\n",
       "1964   1  1.000000   1\n",
       "1966   1  1.000000   1\n",
       "1981 NaN       NaN NaN\n",
       "1987 NaN       NaN NaN\n",
       "1988 NaN       NaN NaN\n",
       "2002 NaN       NaN NaN"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n",
       "AElFTkSuQmCC\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f90c04b0780>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "a = i.loc['Cary Grant',['year','n']].groupby('year').agg(['min', 'mean', 'max'])\n",
    "a.loc[:1942].plot(kind='area', stacked=False)\n",
    "a"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {
    "collapsed": false,
    "scrolled": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>len</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>163401</th>\n",
       "      <td>Night of the Day of the Dawn of the Son of the Bride of the Return of the Revenge of the Terror of the Attack of the Evil Mutant Hellbound Flesh Eating Crawling Alien Zombified Subhumanoid Living Dead, Part 5</td>\n",
       "      <td>2011</td>\n",
       "      <td>208</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>154042</th>\n",
       "      <td>Night of the Day of the Dawn of the Son of the Bride of the Return of the Revenge of the Terror of the Attack of the Evil, Mutant, Hellbound, Flesh-Eating Subhumanoid Zombified Living Dead, Part 3</td>\n",
       "      <td>2005</td>\n",
       "      <td>196</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>120466</th>\n",
       "      <td>Las poquianchis (De los pormenores y otros sucedidos del dominio público que acontecieron a las hermanas de triste memoria a quienes la maledicencia así las bautizó)</td>\n",
       "      <td>1976</td>\n",
       "      <td>165</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>40308</th>\n",
       "      <td>Entrei em Pânico ao Saber o que Vocês Fizeram na Sexta-feira 13 do Verão Passado Parte 2 - A Hora da Volta da Vingança dos Jogos Mortais de Halloween</td>\n",
       "      <td>2011</td>\n",
       "      <td>149</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>173052</th>\n",
       "      <td>Die Antigone des Sophokles nach der Hölderlinschen Übertragung für die Bühne bearbeitet von Brecht 1948 (Suhrkamp Verlag)</td>\n",
       "      <td>1992</td>\n",
       "      <td>121</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                                                                                                                                                                                   title  \\\n",
       "163401  Night of the Day of the Dawn of the Son of the Bride of the Return of the Revenge of the Terror of the Attack of the Evil Mutant Hellbound Flesh Eating Crawling Alien Zombified Subhumanoid Living Dead, Part 5   \n",
       "154042              Night of the Day of the Dawn of the Son of the Bride of the Return of the Revenge of the Terror of the Attack of the Evil, Mutant, Hellbound, Flesh-Eating Subhumanoid Zombified Living Dead, Part 3   \n",
       "120466                                             Las poquianchis (De los pormenores y otros sucedidos del dominio público que acontecieron a las hermanas de triste memoria a quienes la maledicencia así las bautizó)   \n",
       "40308                                                              Entrei em Pânico ao Saber o que Vocês Fizeram na Sexta-feira 13 do Verão Passado Parte 2 - A Hora da Volta da Vingança dos Jogos Mortais de Halloween   \n",
       "173052                                                                                         Die Antigone des Sophokles nach der Hölderlinschen Übertragung für die Bühne bearbeitet von Brecht 1948 (Suhrkamp Verlag)   \n",
       "\n",
       "        year  len  \n",
       "163401  2011  208  \n",
       "154042  2005  196  \n",
       "120466  1976  165  \n",
       "40308   2011  149  \n",
       "173052  1992  121  "
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 5. What are the 5 longest movie titles ever?\n",
    "\n",
    "pd.set_option('max_colwidth', 300)\n",
    "\n",
    "t = titles.copy()\n",
    "t['len'] = t.title.str.len()\n",
    "t = t.sort_values('len', ascending=False)\n",
    "t.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "                 24\n",
       "Hamlet           17\n",
       "Broken           15\n",
       "Macbeth          14\n",
       "Carmen           14\n",
       "Anna Karenina    12\n",
       "Underground      11\n",
       "Maya             11\n",
       "Alone            10\n",
       "Othello          10\n",
       "Revenge          10\n",
       "Love             10\n",
       "The Outsider     10\n",
       "Blood Money      10\n",
       "Temptation       10\n",
       "dtype: int64"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 5. What are the 15 most popular movie titles, if you strip off the suffixes like\n",
    "#    (II) and (III) that the IMDB adds to distinguish movies shown in the same year?\n",
    "\n",
    "titles.title.str.extract('^([^(]*)').value_counts().head(15)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### How many movies actors have been in"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "51"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. How many movies has Judi Dench acted in?\n",
    "\n",
    "len(cast[cast.name == 'Judi Dench'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "43"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. How many movies did Sidney Poitier appear in?\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Sidney Poitier']\n",
    "len(c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "21"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. In how many of his movies was Sidney Poitier the lead (`n==1`)?\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Sidney Poitier']\n",
    "c = c[c.n == 1]\n",
    "len(c)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Pulling and displaying movie credits"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1762207</th>\n",
       "      <td>Mrs Brown</td>\n",
       "      <td>1997</td>\n",
       "      <td>Judi Dench</td>\n",
       "      <td>actress</td>\n",
       "      <td>Queen Victoria</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3110457</th>\n",
       "      <td>Ladies in Lavender</td>\n",
       "      <td>2004</td>\n",
       "      <td>Judi Dench</td>\n",
       "      <td>actress</td>\n",
       "      <td>Ursula</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3407847</th>\n",
       "      <td>Mrs Henderson Presents</td>\n",
       "      <td>2005</td>\n",
       "      <td>Judi Dench</td>\n",
       "      <td>actress</td>\n",
       "      <td>Mrs. Laura Henderson</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3363284</th>\n",
       "      <td>Notes on a Scandal</td>\n",
       "      <td>2006</td>\n",
       "      <td>Judi Dench</td>\n",
       "      <td>actress</td>\n",
       "      <td>Barbara Covett</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3363282</th>\n",
       "      <td>The Best Exotic Marigold Hotel</td>\n",
       "      <td>2011</td>\n",
       "      <td>Judi Dench</td>\n",
       "      <td>actress</td>\n",
       "      <td>Evelyn Greenslade</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2702221</th>\n",
       "      <td>Philomena</td>\n",
       "      <td>2013</td>\n",
       "      <td>Judi Dench</td>\n",
       "      <td>actress</td>\n",
       "      <td>Philomena</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                  title  year        name     type  \\\n",
       "1762207                       Mrs Brown  1997  Judi Dench  actress   \n",
       "3110457              Ladies in Lavender  2004  Judi Dench  actress   \n",
       "3407847          Mrs Henderson Presents  2005  Judi Dench  actress   \n",
       "3363284              Notes on a Scandal  2006  Judi Dench  actress   \n",
       "3363282  The Best Exotic Marigold Hotel  2011  Judi Dench  actress   \n",
       "2702221                       Philomena  2013  Judi Dench  actress   \n",
       "\n",
       "                    character  n  \n",
       "1762207        Queen Victoria  1  \n",
       "3110457                Ursula  1  \n",
       "3407847  Mrs. Laura Henderson  1  \n",
       "3363284        Barbara Covett  1  \n",
       "3363282     Evelyn Greenslade  1  \n",
       "2702221             Philomena  1  "
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. List the movies, sorted by year, in which Judi Dench starred as lead actor.\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Judi Dench']\n",
    "c = c[c.n == 1]\n",
    "c.sort_values('year')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2815436</th>\n",
       "      <td>Sleuth</td>\n",
       "      <td>1972</td>\n",
       "      <td>Laurence Olivier</td>\n",
       "      <td>actor</td>\n",
       "      <td>Andrew Wyke</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1985454</th>\n",
       "      <td>Sleuth</td>\n",
       "      <td>1972</td>\n",
       "      <td>Michael Caine</td>\n",
       "      <td>actor</td>\n",
       "      <td>Milo Tindle</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2004531</th>\n",
       "      <td>Sleuth</td>\n",
       "      <td>1972</td>\n",
       "      <td>Alec Cawthorne</td>\n",
       "      <td>actor</td>\n",
       "      <td>Inspector Doppler</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2707118</th>\n",
       "      <td>Sleuth</td>\n",
       "      <td>1972</td>\n",
       "      <td>John Matthews (II)</td>\n",
       "      <td>actor</td>\n",
       "      <td>Detective Sergeant Tarrant</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3292963</th>\n",
       "      <td>Sleuth</td>\n",
       "      <td>1972</td>\n",
       "      <td>Eve Channing (III)</td>\n",
       "      <td>actress</td>\n",
       "      <td>Marguerite Wyke</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2693963</th>\n",
       "      <td>Sleuth</td>\n",
       "      <td>1972</td>\n",
       "      <td>Teddy Martin</td>\n",
       "      <td>actor</td>\n",
       "      <td>Police Constable Higgs</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "          title  year                name     type  \\\n",
       "2815436  Sleuth  1972    Laurence Olivier    actor   \n",
       "1985454  Sleuth  1972       Michael Caine    actor   \n",
       "2004531  Sleuth  1972      Alec Cawthorne    actor   \n",
       "2707118  Sleuth  1972  John Matthews (II)    actor   \n",
       "3292963  Sleuth  1972  Eve Channing (III)  actress   \n",
       "2693963  Sleuth  1972        Teddy Martin    actor   \n",
       "\n",
       "                          character  n  \n",
       "2815436                 Andrew Wyke  1  \n",
       "1985454                 Milo Tindle  2  \n",
       "2004531           Inspector Doppler  3  \n",
       "2707118  Detective Sergeant Tarrant  4  \n",
       "3292963             Marguerite Wyke  5  \n",
       "2693963      Police Constable Higgs  6  "
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 1. Who was credited in the 1972 version of Sleuth, in order by `n` rank?\n",
    "\n",
    "c = cast\n",
    "c = c[c.title == 'Sleuth']\n",
    "c = c[c.year == 1972]\n",
    "c.sort_values('n')"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Common character names"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Himself      24293\n",
       "Dancer       11697\n",
       "Extra         8865\n",
       "Reporter      7792\n",
       "Doctor        7666\n",
       "Herself       7501\n",
       "Policeman     7245\n",
       "Student       6694\n",
       "Nurse         6636\n",
       "Bartender     6298\n",
       "Zombie        5785\n",
       "dtype: int64"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. What are the 11 most common character names in movie history?\n",
    "\n",
    "cast.character.value_counts().head(11)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "name\n",
       "Richard Ricci         3\n",
       "Colin Murtagh         3\n",
       "Terry Gindele         3\n",
       "Samuel R. Solito      3\n",
       "John Migliore (II)    6\n",
       "dtype: int64"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 3. Which actors have played the role “Zombie” the most times?\n",
    "\n",
    "c = cast\n",
    "c = c[c.character == 'Zombie']\n",
    "c = c.groupby('name').size().order()\n",
    "c.tail(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "name\n",
       "Mary Jo Pehl           7\n",
       "Cosey Fanni Tutti      7\n",
       "Brigitte Bardot        7\n",
       "Petula Clark           7\n",
       "Joan Rivers            8\n",
       "Queen Mary             8\n",
       "Margaret Thatcher      9\n",
       "Denise Austin         10\n",
       "Joyce Brothers        14\n",
       "Queen Elizabeth II    14\n",
       "dtype: int64"
      ]
     },
     "execution_count": 33,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 3. Which ten people have appeared most often as “Herself” over the history of film?\n",
    "\n",
    "c = cast\n",
    "c = c[c.character == 'Herself']\n",
    "c = c.groupby('name').size().order()\n",
    "c.tail(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "name\n",
       "Bill Clinton              22\n",
       "Josip Broz Tito           23\n",
       "Franklin D. Roosevelt     23\n",
       "George W. Bush            24\n",
       "Ron Jeremy                24\n",
       "Amitabh Bachchan          25\n",
       "Ronald Reagan             30\n",
       "John F. Kennedy           33\n",
       "Richard Nixon             43\n",
       "Adolf Hitler             104\n",
       "dtype: int64"
      ]
     },
     "execution_count": 34,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 3. Which ten people have appeared most often as “Himself” over the history of film?\n",
    "\n",
    "c = cast\n",
    "c = c[c.character == 'Himself']\n",
    "c = c.groupby('name').size().order()\n",
    "c.tail(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Himself     24293\n",
       "Dancer      11697\n",
       "Extra        8865\n",
       "Reporter     7792\n",
       "Doctor       7666\n",
       "dtype: int64"
      ]
     },
     "execution_count": 35,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 4. Take the 50 most common character names in film.\n",
    "#    Which are most often played by men?\n",
    "\n",
    "c = cast\n",
    "clist = c.character.value_counts().head(50)\n",
    "clist.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Frank      2355\n",
       "Teacher    2313\n",
       "Tom        2282\n",
       "Mary       2278\n",
       "Sarah      2251\n",
       "dtype: int64"
      ]
     },
     "execution_count": 36,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "clist.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 37,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": [
    "cast_by_character = cast.sort_values('character').set_index('character')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 38,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>type</th>\n",
       "      <th>actor</th>\n",
       "      <th>actress</th>\n",
       "      <th>ratio</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>character</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Townsman</th>\n",
       "      <td>4963</td>\n",
       "      <td>3</td>\n",
       "      <td>0.000604</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>John</th>\n",
       "      <td>2628</td>\n",
       "      <td>2</td>\n",
       "      <td>0.000760</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Henchman</th>\n",
       "      <td>4876</td>\n",
       "      <td>4</td>\n",
       "      <td>0.000820</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Policeman</th>\n",
       "      <td>7233</td>\n",
       "      <td>12</td>\n",
       "      <td>0.001656</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Himself</th>\n",
       "      <td>24251</td>\n",
       "      <td>42</td>\n",
       "      <td>0.001729</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "type       actor  actress     ratio\n",
       "character                          \n",
       "Townsman    4963        3  0.000604\n",
       "John        2628        2  0.000760\n",
       "Henchman    4876        4  0.000820\n",
       "Policeman   7233       12  0.001656\n",
       "Himself    24251       42  0.001729"
      ]
     },
     "execution_count": 38,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = cast_by_character.loc[clist.index][['type']]\n",
    "c = c.reset_index()\n",
    "c = c.groupby(['character', 'type']).size()\n",
    "c = c.unstack()\n",
    "c['ratio'] = c.actress / (c.actor + c.actress)\n",
    "c = c.sort_values('ratio')\n",
    "c.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 39,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>type</th>\n",
       "      <th>actor</th>\n",
       "      <th>actress</th>\n",
       "      <th>ratio</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>character</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Anna</th>\n",
       "      <td>86</td>\n",
       "      <td>2868</td>\n",
       "      <td>0.970887</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mary</th>\n",
       "      <td>46</td>\n",
       "      <td>2232</td>\n",
       "      <td>0.979807</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Girl</th>\n",
       "      <td>43</td>\n",
       "      <td>2513</td>\n",
       "      <td>0.983177</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Maria</th>\n",
       "      <td>27</td>\n",
       "      <td>3080</td>\n",
       "      <td>0.991310</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Herself</th>\n",
       "      <td>59</td>\n",
       "      <td>7442</td>\n",
       "      <td>0.992134</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "type       actor  actress     ratio\n",
       "character                          \n",
       "Anna          86     2868  0.970887\n",
       "Mary          46     2232  0.979807\n",
       "Girl          43     2513  0.983177\n",
       "Maria         27     3080  0.991310\n",
       "Herself       59     7442  0.992134"
      ]
     },
     "execution_count": 39,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 4. …which of those 50 characters are most often played by women?\n",
    "\n",
    "c.tail()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 40,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>type</th>\n",
       "      <th>actor</th>\n",
       "      <th>actress</th>\n",
       "      <th>ratio</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>character</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Student</th>\n",
       "      <td>3845</td>\n",
       "      <td>2849</td>\n",
       "      <td>0.425605</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Singer</th>\n",
       "      <td>1706</td>\n",
       "      <td>1811</td>\n",
       "      <td>0.514927</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Teacher</th>\n",
       "      <td>1079</td>\n",
       "      <td>1234</td>\n",
       "      <td>0.533506</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "type       actor  actress     ratio\n",
       "character                          \n",
       "Student     3845     2849  0.425605\n",
       "Singer      1706     1811  0.514927\n",
       "Teacher     1079     1234  0.533506"
      ]
     },
     "execution_count": 40,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 4. …which of those 50 characters have a ratio closest to 0.5?\n",
    "\n",
    "c[(c.ratio > 0.4) & (c.ratio < 0.6)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Who has been in the most movies"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 41,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Emmett Vogan       39\n",
       "Sam Harris (II)    30\n",
       "Harold Miller      28\n",
       "Bess Flowers       28\n",
       "Nolan Leary        27\n",
       "Frank O'Connor     26\n",
       "Edmund Cobb        24\n",
       "Franklyn Farnum    24\n",
       "Tom London         24\n",
       "Pierre Watkin      24\n",
       "dtype: int64"
      ]
     },
     "execution_count": 41,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. Which actors or actresses appeared in the most movies in the year 1945?\n",
    "\n",
    "cast[cast.year == 1945].name.value_counts().head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Mammootty           34\n",
       "Shakti Kapoor       26\n",
       "Mohanlal            22\n",
       "Sukumari            19\n",
       "Satyendra Kapoor    17\n",
       "Kader Khan          16\n",
       "Asrani              16\n",
       "Rajesh Khanna       15\n",
       "Aruna Irani         15\n",
       "Raj Babbar          15\n",
       "dtype: int64"
      ]
     },
     "execution_count": 42,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. Which actors or actresses appeared in the most movies in the year 1985?\n",
    "\n",
    "cast[cast.year == 1985].name.value_counts().head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 15.8 s, sys: 2.68 s, total: 18.5 s\n",
      "Wall time: 18.9 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "# 2. Create a `cast_by_title_year` dataframe indexed by title and year\n",
    "#    to use in the next few questions.\n",
    "\n",
    "cast_by_title_year = cast.set_index(['title', 'year']).sort_index()\n",
    "cast_by_title_year.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 183 ms, sys: 4.19 ms, total: 187 ms\n",
      "Wall time: 186 ms\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Leonardo DiCaprio</td>\n",
       "      <td>actor</td>\n",
       "      <td>Cobb</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Joseph Gordon-Levitt</td>\n",
       "      <td>actor</td>\n",
       "      <td>Arthur</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Ellen Page</td>\n",
       "      <td>actress</td>\n",
       "      <td>Ariadne</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Tom Hardy</td>\n",
       "      <td>actor</td>\n",
       "      <td>Eames</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Ken Watanabe</td>\n",
       "      <td>actor</td>\n",
       "      <td>Saito</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Dileep Rao</td>\n",
       "      <td>actor</td>\n",
       "      <td>Yusuf</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Cillian Murphy</td>\n",
       "      <td>actor</td>\n",
       "      <td>Robert Fischer</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Tom Berenger</td>\n",
       "      <td>actor</td>\n",
       "      <td>Browning</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Marion Cotillard</td>\n",
       "      <td>actress</td>\n",
       "      <td>Mal</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2010</th>\n",
       "      <td>Pete Postlethwaite</td>\n",
       "      <td>actor</td>\n",
       "      <td>Maurice Fischer</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                      name     type        character   n\n",
       "year                                                    \n",
       "2010     Leonardo DiCaprio    actor             Cobb   1\n",
       "2010  Joseph Gordon-Levitt    actor           Arthur   2\n",
       "2010            Ellen Page  actress          Ariadne   3\n",
       "2010             Tom Hardy    actor            Eames   4\n",
       "2010          Ken Watanabe    actor            Saito   5\n",
       "2010            Dileep Rao    actor            Yusuf   6\n",
       "2010        Cillian Murphy    actor   Robert Fischer   7\n",
       "2010          Tom Berenger    actor         Browning   8\n",
       "2010      Marion Cotillard  actress              Mal   9\n",
       "2010    Pete Postlethwaite    actor  Maurice Fischer  10"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "%%time\n",
    "# 2. Use `cast_by_title_year` to find the stars of the film Inception\n",
    "#    and order them by `n` before displaying the top 10.\n",
    "\n",
    "cast_by_title_year.loc['Inception'].sort_values('n').head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 45,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"10\" valign=\"top\">Hamlet</th>\n",
       "      <th>1996</th>\n",
       "      <td>Riz Abbasi</td>\n",
       "      <td>actor</td>\n",
       "      <td>Attendant to Claudius</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>Richard Attenborough</td>\n",
       "      <td>actor</td>\n",
       "      <td>English Ambassador</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>David Blair (V)</td>\n",
       "      <td>actor</td>\n",
       "      <td>Attendant to Claudius</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>Brian Blessed</td>\n",
       "      <td>actor</td>\n",
       "      <td>Ghost of Hamlet's Father</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>Kenneth Branagh</td>\n",
       "      <td>actor</td>\n",
       "      <td>Hamlet</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>Richard Briers</td>\n",
       "      <td>actor</td>\n",
       "      <td>Polonius</td>\n",
       "      <td>6</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>Michael Bryant</td>\n",
       "      <td>actor</td>\n",
       "      <td>Priest</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>Peter Bygott</td>\n",
       "      <td>actor</td>\n",
       "      <td>Attendant to Claudius</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>Julie Christie</td>\n",
       "      <td>actress</td>\n",
       "      <td>Gertrude</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <td>Billy Crystal</td>\n",
       "      <td>actor</td>\n",
       "      <td>First Gravedigger</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                             name     type                 character   n\n",
       "title  year                                                             \n",
       "Hamlet 1996            Riz Abbasi    actor     Attendant to Claudius   1\n",
       "       1996  Richard Attenborough    actor        English Ambassador   2\n",
       "       1996       David Blair (V)    actor     Attendant to Claudius   3\n",
       "       1996         Brian Blessed    actor  Ghost of Hamlet's Father   4\n",
       "       1996       Kenneth Branagh    actor                    Hamlet   5\n",
       "       1996        Richard Briers    actor                  Polonius   6\n",
       "       1996        Michael Bryant    actor                    Priest   7\n",
       "       1996          Peter Bygott    actor     Attendant to Claudius   8\n",
       "       1996        Julie Christie  actress                  Gertrude   9\n",
       "       1996         Billy Crystal    actor         First Gravedigger  10"
      ]
     },
     "execution_count": 45,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 2. Use `cast_by_title_year` to find the first 10 stars in the 1996 film Hamlet,\n",
    "#    and order them by `n`.\n",
    "\n",
    "cast_by_title_year.loc['Hamlet',1996].sort_values('n').head(10)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Mark Hamill 42\n",
      "Harrison Ford 44\n",
      "Carrie Fisher 40\n",
      "Peter Cushing 10\n",
      "Alec Guinness 9\n",
      "Anthony Daniels 11\n",
      "Kenny Baker 18\n",
      "Peter Mayhew (II) 7\n",
      "David Prowse 5\n",
      "CPU times: user 8.7 s, sys: 11.8 ms, total: 8.71 s\n",
      "Wall time: 8.73 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "# 2. Write a `for` loop that, for the top 9 actors in the 1977 movie Star Wars,\n",
    "#    determines how many movies they starred in after 1977.\n",
    "\n",
    "names = cast_by_title_year.loc['Star Wars',1977].sort_values('n').head(9).name\n",
    "for name in names:\n",
    "    print(name, len(cast[(cast.name == name) & (cast.year > 1977)]))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 47,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# 2. Create an indexed version of `cast` that, once built, lets you answer\n",
    "#    the previous question with a `for` loop that finishes in under a second.\n",
    "\n",
    "i = cast.set_index('name').sort_index()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 48,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Mark Hamill 42\n",
      "Harrison Ford 44\n",
      "Carrie Fisher 40\n",
      "Peter Cushing 10\n",
      "Alec Guinness 9\n",
      "Anthony Daniels 11\n",
      "Kenny Baker 18\n",
      "Peter Mayhew (II) 7\n",
      "David Prowse 5\n",
      "CPU times: user 2.8 s, sys: 64.4 ms, total: 2.86 s\n",
      "Wall time: 2.89 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "for name in names:\n",
    "    c = i.loc[name]\n",
    "    c = c[c.year > 1977]\n",
    "    #c = c[(c.character != 'Himself') & (c.character != 'Herself')]\n",
    "    print(name, len(c))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 49,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "year\n",
       "1910     1\n",
       "1911     6\n",
       "1913    21\n",
       "1921     9\n",
       "1948    25\n",
       "1954     1\n",
       "1964    33\n",
       "1969    24\n",
       "1973     8\n",
       "1976    11\n",
       "1987     3\n",
       "1990    29\n",
       "1996    55\n",
       "2000    38\n",
       "2009    17\n",
       "2011    12\n",
       "2015     6\n",
       "dtype: int64"
      ]
     },
     "execution_count": 49,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 3. How many people were cast in each of the movies named \"Hamlet”?\n",
    "\n",
    "c = cast\n",
    "c = c[c.title == 'Hamlet']\n",
    "c = c.groupby('year').size() \n",
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 50,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "title         year\n",
       "Hamlet        1910     1\n",
       "              1911     6\n",
       "              1913    21\n",
       "              1921     9\n",
       "              1948    25\n",
       "              1954     1\n",
       "              1964    33\n",
       "              1969    24\n",
       "              1973     8\n",
       "              1976    11\n",
       "              1987     3\n",
       "              1990    29\n",
       "              1996    55\n",
       "              2000    38\n",
       "              2009    17\n",
       "              2011    12\n",
       "              2015     6\n",
       "Hamlet (II)   1964    21\n",
       "              2005    20\n",
       "              2007    16\n",
       "              2015    10\n",
       "Hamlet (III)  2007     2\n",
       "              2015    14\n",
       "dtype: int64"
      ]
     },
     "execution_count": 50,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 5. How many actors are in the cast of each version of Hamlet,\n",
    "#    including Hamlets with IMDB name collisions like \"Hamlet (II)\"\n",
    "#    and \"Hamlet (III)\"? [BAD]\n",
    "\n",
    "c = cast_by_title_year\n",
    "# c.loc['Hamlet':'Hamlet (Z'].index.value_counts()    - Drat\n",
    "# c.loc['Hamlet':'Hamlet (Z'].groupby(level=0).size() - Drat\n",
    "# c.loc['Hamlet':'Hamlet (Z'].groupby(level=1).size() - Drat\n",
    "c.loc['Hamlet':'Hamlet (Z'].groupby(level=[0,1]).size()\n",
    "\n",
    "# Or:\n",
    "#c = cast[(cast.title >= 'Hamlet') & (cast.title < 'Hamlet (Z')]\n",
    "#c.groupby(['title', 'year']).size()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "### Actors and Actresses"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 51,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>type</th>\n",
       "      <th>actor</th>\n",
       "      <th>actress</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1894</th>\n",
       "      <td>2</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1898</th>\n",
       "      <td>NaN</td>\n",
       "      <td>1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1899</th>\n",
       "      <td>6</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1900</th>\n",
       "      <td>2</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1902</th>\n",
       "      <td>1</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "type  actor  actress\n",
       "year                \n",
       "1894      2        1\n",
       "1898    NaN        1\n",
       "1899      6      NaN\n",
       "1900      2      NaN\n",
       "1902      1      NaN"
      ]
     },
     "execution_count": 51,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 4. Build a dataframe with a row for each year with two columns:\n",
    "#    the number of roles for actors in that year's films,\n",
    "#    and the number of roles for actresses.\n",
    "\n",
    "aa = cast[['year', 'type']].groupby(['year', 'type']).size()\n",
    "aa = aa.loc[:2014].unstack()\n",
    "aa.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f90bfb2d2e8>"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f90bfb54630>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 4. Use that dataframe to make a kind='area' plot showing the total\n",
    "#    number of roles available over the history of film.\n",
    "\n",
    "aa.plot(kind='area')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f90bfcfba58>"
      ]
     },
     "execution_count": 53,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n",
       "hH0AAAAASUVORK5CYII=\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f90c184ce48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "f = aa.actor / (aa.actor + aa.actress)\n",
    "f.plot(ylim=[0,1], kind='area')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f90801ec0b8>"
      ]
     },
     "execution_count": 54,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n",
       "QmCC\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f90801f2e48>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "c = cast\n",
    "#c = c[c.year // 10 == 198]\n",
    "c = c[c.n <= 3]\n",
    "c = c.groupby(['year', 'type', 'n']).size()\n",
    "c = c.unstack(1)\n",
    "c.swaplevel(0,1).loc[1].plot(ylim=0, kind='area')\n",
    "#f = c.actor / (c.actor + c.actress)\n",
    "#f = f.unstack()\n",
    "#f.plot(ylim=[0,1])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "### Rank over time"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1986.83333333\n"
     ]
    }
   ],
   "source": [
    "# 2. Define “leading actor” as an actor or actress whose `n==1`\n",
    "#    and “supporting actor” as `n==2` — what is the average year\n",
    "#    of all the supporting roles Judi Dench has had?\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Judi Dench']\n",
    "print(c[c.n == 2].year.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "2006.0\n"
     ]
    }
   ],
   "source": [
    "# 2. What is the average year of Judi Dench’s leading roles —\n",
    "#    is her career moving forwards toward leading roles\n",
    "#    or backwards towards supporting ones?\n",
    "\n",
    "print(c[c.n == 1].year.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1961.75\n",
      "1970.47619048\n"
     ]
    }
   ],
   "source": [
    "# 2. Did Sidney Poitier move forward or back over his career?\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Sidney Poitier']\n",
    "print(c[c.n == 2].year.mean())\n",
    "print(c[c.n == 1].year.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "1988.38095238\n",
      "1983.51923077\n"
     ]
    }
   ],
   "source": [
    "# 2. What about Michael Caine?\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Michael Caine']\n",
    "print(c[c.n == 2].year.mean())\n",
    "print(c[c.n == 1].year.mean())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>size</th>\n",
       "      <th>mean</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>!Mystery Girl!</th>\n",
       "      <td>1</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>'Ace' Reitman</th>\n",
       "      <td>1</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>'Agent' Ava Hubbard</th>\n",
       "      <td>1</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>'Amarillo Slim' Preston</th>\n",
       "      <td>1</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>'Apple' Hamidu</th>\n",
       "      <td>1</td>\n",
       "      <td>71</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                         size  mean\n",
       "name                               \n",
       "!Mystery Girl!              1    29\n",
       "'Ace' Reitman               1    11\n",
       "'Agent' Ava Hubbard         1    29\n",
       "'Amarillo Slim' Preston     1    31\n",
       "'Apple' Hamidu              1    71"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = cast\n",
    "#c = c[c.year // 10 == 195]\n",
    "c = c[c.n.notnull()].groupby('name').n.agg(['size', 'mean'])\n",
    "c.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>size</th>\n",
       "      <th>mean</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>name</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Stanley Lupino</th>\n",
       "      <td>13</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ferdi Tayfur (II)</th>\n",
       "      <td>11</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Harold Lloyd</th>\n",
       "      <td>19</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Orhan Gencebay</th>\n",
       "      <td>11</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mohamad Ali Fardin</th>\n",
       "      <td>11</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Jeyam Ravi</th>\n",
       "      <td>16</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Amácio Mazzaropi</th>\n",
       "      <td>26</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Emmy Wehlen</th>\n",
       "      <td>18</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Edna Goodrich</th>\n",
       "      <td>11</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Prabhas</th>\n",
       "      <td>17</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ganesh (XII)</th>\n",
       "      <td>18</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>William S. Hart</th>\n",
       "      <td>50</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>K.L. Saigal</th>\n",
       "      <td>19</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Dulquer Salmaan</th>\n",
       "      <td>10</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Olga Petrova</th>\n",
       "      <td>32</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Will Hay</th>\n",
       "      <td>19</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Evelyn Nesbit</th>\n",
       "      <td>10</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Emel Sayin</th>\n",
       "      <td>11</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Marie Doro</th>\n",
       "      <td>15</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Junior N.T.R.</th>\n",
       "      <td>20</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Scott Shaw</th>\n",
       "      <td>20</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Emily Stevens</th>\n",
       "      <td>16</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Nobuyo Ohyama</th>\n",
       "      <td>25</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Ed Skudder</th>\n",
       "      <td>13</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>José Mojica</th>\n",
       "      <td>15</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Carl Brisson</th>\n",
       "      <td>12</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Upendra</th>\n",
       "      <td>13</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fernand Raynaud</th>\n",
       "      <td>15</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Tristan Newcomb</th>\n",
       "      <td>10</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Joe Sears</th>\n",
       "      <td>10</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Stefan Kramer</th>\n",
       "      <td>18</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Valeska Suratt</th>\n",
       "      <td>11</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Roscoe 'Fatty' Arbuckle</th>\n",
       "      <td>11</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fannie Ward</th>\n",
       "      <td>26</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Billie Rhodes</th>\n",
       "      <td>10</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>George Formby</th>\n",
       "      <td>22</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mark Forest</th>\n",
       "      <td>17</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Earl Owensby</th>\n",
       "      <td>10</td>\n",
       "      <td>1.000000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Yilmaz Güney</th>\n",
       "      <td>74</td>\n",
       "      <td>1.013514</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Vijay (XX)</th>\n",
       "      <td>37</td>\n",
       "      <td>1.027027</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mary Pickford</th>\n",
       "      <td>57</td>\n",
       "      <td>1.035088</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Alberto Olmedo</th>\n",
       "      <td>25</td>\n",
       "      <td>1.040000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Pearl White</th>\n",
       "      <td>25</td>\n",
       "      <td>1.040000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>June Caprice</th>\n",
       "      <td>21</td>\n",
       "      <td>1.047619</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Türkan Soray</th>\n",
       "      <td>56</td>\n",
       "      <td>1.053571</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Lito Lapid</th>\n",
       "      <td>54</td>\n",
       "      <td>1.055556</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Sumanth</th>\n",
       "      <td>15</td>\n",
       "      <td>1.066667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Setsuko Ogawa</th>\n",
       "      <td>15</td>\n",
       "      <td>1.066667</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Farid Al Atrache</th>\n",
       "      <td>14</td>\n",
       "      <td>1.071429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Dai Lin</th>\n",
       "      <td>14</td>\n",
       "      <td>1.071429</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Vivian Martin</th>\n",
       "      <td>40</td>\n",
       "      <td>1.075000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Esa Pakarinen</th>\n",
       "      <td>13</td>\n",
       "      <td>1.076923</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Dustin Farnum</th>\n",
       "      <td>39</td>\n",
       "      <td>1.076923</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Suzzanna</th>\n",
       "      <td>12</td>\n",
       "      <td>1.083333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Hazel Dawn</th>\n",
       "      <td>12</td>\n",
       "      <td>1.083333</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Momoe Yamaguchi</th>\n",
       "      <td>11</td>\n",
       "      <td>1.090909</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Mary Miles Minter</th>\n",
       "      <td>53</td>\n",
       "      <td>1.094340</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Grace Moore</th>\n",
       "      <td>10</td>\n",
       "      <td>1.100000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Rajkumar</th>\n",
       "      <td>20</td>\n",
       "      <td>1.100000</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Vasilis Logothetidis</th>\n",
       "      <td>10</td>\n",
       "      <td>1.100000</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                         size      mean\n",
       "name                                   \n",
       "Stanley Lupino             13  1.000000\n",
       "Ferdi Tayfur (II)          11  1.000000\n",
       "Harold Lloyd               19  1.000000\n",
       "Orhan Gencebay             11  1.000000\n",
       "Mohamad Ali Fardin         11  1.000000\n",
       "Jeyam Ravi                 16  1.000000\n",
       "Amácio Mazzaropi           26  1.000000\n",
       "Emmy Wehlen                18  1.000000\n",
       "Edna Goodrich              11  1.000000\n",
       "Prabhas                    17  1.000000\n",
       "Ganesh (XII)               18  1.000000\n",
       "William S. Hart            50  1.000000\n",
       "K.L. Saigal                19  1.000000\n",
       "Dulquer Salmaan            10  1.000000\n",
       "Olga Petrova               32  1.000000\n",
       "Will Hay                   19  1.000000\n",
       "Evelyn Nesbit              10  1.000000\n",
       "Emel Sayin                 11  1.000000\n",
       "Marie Doro                 15  1.000000\n",
       "Junior N.T.R.              20  1.000000\n",
       "Scott Shaw                 20  1.000000\n",
       "Emily Stevens              16  1.000000\n",
       "Nobuyo Ohyama              25  1.000000\n",
       "Ed Skudder                 13  1.000000\n",
       "José Mojica                15  1.000000\n",
       "Carl Brisson               12  1.000000\n",
       "Upendra                    13  1.000000\n",
       "Fernand Raynaud            15  1.000000\n",
       "Tristan Newcomb            10  1.000000\n",
       "Joe Sears                  10  1.000000\n",
       "Stefan Kramer              18  1.000000\n",
       "Valeska Suratt             11  1.000000\n",
       "Roscoe 'Fatty' Arbuckle    11  1.000000\n",
       "Fannie Ward                26  1.000000\n",
       "Billie Rhodes              10  1.000000\n",
       "George Formby              22  1.000000\n",
       "Mark Forest                17  1.000000\n",
       "Earl Owensby               10  1.000000\n",
       "Yilmaz Güney               74  1.013514\n",
       "Vijay (XX)                 37  1.027027\n",
       "Mary Pickford              57  1.035088\n",
       "Alberto Olmedo             25  1.040000\n",
       "Pearl White                25  1.040000\n",
       "June Caprice               21  1.047619\n",
       "Türkan Soray               56  1.053571\n",
       "Lito Lapid                 54  1.055556\n",
       "Sumanth                    15  1.066667\n",
       "Setsuko Ogawa              15  1.066667\n",
       "Farid Al Atrache           14  1.071429\n",
       "Dai Lin                    14  1.071429\n",
       "Vivian Martin              40  1.075000\n",
       "Esa Pakarinen              13  1.076923\n",
       "Dustin Farnum              39  1.076923\n",
       "Suzzanna                   12  1.083333\n",
       "Hazel Dawn                 12  1.083333\n",
       "Momoe Yamaguchi            11  1.090909\n",
       "Mary Miles Minter          53  1.094340\n",
       "Grace Moore                10  1.100000\n",
       "Rajkumar                   20  1.100000\n",
       "Vasilis Logothetidis       10  1.100000"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = c[c['size'] >= 10]\n",
    "c = c.sort_values('mean')\n",
    "c.head(60)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "markdown",
   "metadata": {
    "collapsed": true
   },
   "source": [
    "### Release dates"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>country</th>\n",
       "      <th>date</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0_1_0</td>\n",
       "      <td>2008</td>\n",
       "      <td>Poland</td>\n",
       "      <td>2008-11-14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Ai no Sanka</td>\n",
       "      <td>1967</td>\n",
       "      <td>Japan</td>\n",
       "      <td>1967-01-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>A Thousand to One</td>\n",
       "      <td>1920</td>\n",
       "      <td>USA</td>\n",
       "      <td>1920-12-05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>A Prince of a King</td>\n",
       "      <td>1923</td>\n",
       "      <td>USA</td>\n",
       "      <td>1923-10-13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>A Prince of a King</td>\n",
       "      <td>1923</td>\n",
       "      <td>Netherlands</td>\n",
       "      <td>1924-08-08</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                title  year      country       date\n",
       "0               0_1_0  2008       Poland 2008-11-14\n",
       "1         Ai no Sanka  1967        Japan 1967-01-01\n",
       "2   A Thousand to One  1920          USA 1920-12-05\n",
       "3  A Prince of a King  1923          USA 1923-10-13\n",
       "4  A Prince of a King  1923  Netherlands 1924-08-08"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "release_dates.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 166,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "12    3\n",
       "11    1\n",
       "dtype: int64"
      ]
     },
     "execution_count": 166,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 5. In which month is a movie whose name starts with the text\n",
    "#    \"The Lord of the Rings\" most likely to be released?\n",
    "\n",
    "r = release_dates\n",
    "r = r[r.title.str.startswith('The Lord of the Rings')]\n",
    "r = r[r.country == 'USA']\n",
    "r.date.dt.month.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 172,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11    19\n",
       "12    11\n",
       "10     9\n",
       "1      2\n",
       "7      1\n",
       "4      1\n",
       "2      1\n",
       "dtype: int64"
      ]
     },
     "execution_count": 172,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 5. In which months is a movie whose name ends in the word \"Christmas\"\n",
    "#    most likely to be released?\n",
    "\n",
    "r = release_dates\n",
    "r = r[r.title.str.endswith('Christmas')]\n",
    "r = r[r.country == 'USA']\n",
    "r.date.dt.month.value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 62,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>country</th>\n",
       "      <th>date</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>#73, Shaanthi Nivaasa</th>\n",
       "      <th>2007</th>\n",
       "      <td>India</td>\n",
       "      <td>2007-06-15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>#Beings</th>\n",
       "      <th>2015</th>\n",
       "      <td>Romania</td>\n",
       "      <td>2015-01-29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>#Ewankosau saranghaeyo</th>\n",
       "      <th>2015</th>\n",
       "      <td>Philippines</td>\n",
       "      <td>2015-01-21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>#Horror</th>\n",
       "      <th>2015</th>\n",
       "      <td>USA</td>\n",
       "      <td>2015-01-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>#Nerealnaya lyubov</th>\n",
       "      <th>2014</th>\n",
       "      <td>Russia</td>\n",
       "      <td>2014-02-13</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                 country       date\n",
       "title                  year                        \n",
       "#73, Shaanthi Nivaasa  2007        India 2007-06-15\n",
       "#Beings                2015      Romania 2015-01-29\n",
       "#Ewankosau saranghaeyo 2015  Philippines 2015-01-21\n",
       "#Horror                2015          USA 2015-01-01\n",
       "#Nerealnaya lyubov     2014       Russia 2014-02-13"
      ]
     },
     "execution_count": 62,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rd = release_dates.set_index(['title', 'year']).sort_index()\n",
    "rd.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 117,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>country</th>\n",
       "      <th>date</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>#Beings</th>\n",
       "      <th>2015</th>\n",
       "      <td>Romania</td>\n",
       "      <td>2015-01-29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>#Horror</th>\n",
       "      <th>2015</th>\n",
       "      <td>USA</td>\n",
       "      <td>2015-01-01</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "              country       date\n",
       "title   year                    \n",
       "#Beings 2015  Romania 2015-01-29\n",
       "#Horror 2015      USA 2015-01-01"
      ]
     },
     "execution_count": 117,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "rd.loc[[('#Beings', 2015), ('#Horror', 2015)]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 124,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([['Top Gun', 1986],\n",
       "       ['Legend', 1985],\n",
       "       ['Oblivion', 2013],\n",
       "       ['Collateral', 2004],\n",
       "       ['Endless Love', 1981],\n",
       "       ['Austin Powers in Goldmember', 2002],\n",
       "       ['August', 2008],\n",
       "       ['The Queen', 2006],\n",
       "       [\"Losin' It\", 1983],\n",
       "       ['Edge of Tomorrow', 2014],\n",
       "       ['Mission: Impossible III', 2006],\n",
       "       ['Mission: Impossible', 1996],\n",
       "       ['Mission: Impossible - Rogue Nation', 2015],\n",
       "       ['Mission: Impossible - Ghost Protocol', 2011],\n",
       "       ['Mission: Impossible II', 2000],\n",
       "       ['War of the Worlds', 2005],\n",
       "       ['Knight and Day', 2010],\n",
       "       ['Minority Report', 2002],\n",
       "       ['Cocktail', 1988],\n",
       "       ['The Outsiders', 1983],\n",
       "       ['Rock of Ages', 2012],\n",
       "       ['All the Right Moves', 1983],\n",
       "       ['Taps', 1981],\n",
       "       ['Jerry Maguire', 1996],\n",
       "       ['The Last Samurai', 2003],\n",
       "       ['Born on the Fourth of July', 1989],\n",
       "       ['Far and Away', 1992],\n",
       "       ['Magnolia', 1999],\n",
       "       ['Vanilla Sky', 2001],\n",
       "       ['Tropic Thunder', 2008],\n",
       "       ['Valkyrie', 2008],\n",
       "       ['Days of Thunder', 1990],\n",
       "       ['Eyes Wide Shut', 1999],\n",
       "       ['Rain Man', 1988],\n",
       "       ['Jack Reacher', 2012],\n",
       "       ['The Color of Money', 1986],\n",
       "       ['Lions for Lambs', 2007],\n",
       "       ['Risky Business', 1983],\n",
       "       ['A Few Good Men', 1992],\n",
       "       ['Interview with the Vampire: The Vampire Chronicles', 1994],\n",
       "       ['The Firm', 1993]], dtype=object)"
      ]
     },
     "execution_count": 124,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = cast\n",
    "c = c[c.name == 'Tom Cruise'][['title', 'year']].drop_duplicates()\n",
    "#c = c.join(rd, ['title', 'year'])\n",
    "#c = c[c.country == 'USA']\n",
    "#c.date.dt.month.value_counts().sort_index().plot(kind='bar')\n",
    "c.values"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 128,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# ASK\n",
    "# rd.loc[c]\n",
    "# rd.loc[c.values]\n",
    "# rd.loc[list(c.values)]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 138,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f90a42fb860>"
      ]
     },
     "execution_count": 138,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "iVBORw0KGgoAAAANSUhEUgAAAWYAAAEBCAYAAABL1w/0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n",
       "AAALEgAACxIB0t1+/AAAFphJREFUeJzt3X2sZHV9x/H3h11FFhDSqKhFXWuqfdIiPoRqTC+pGjRq\n",
       "rW0TqX1Yjf7TVjCtRq1tNGmiaDXW2JjGKizWp1gfi40KWn4IIUXQvZSHRdvGG8EHJOJCQI0o3/4x\n",
       "Z9hzZ3fPzN07v/M7c36fV3Kzc+bM/X3Od87M99753rl3FRGYmdlwHFP6AMzMbDM3ZjOzgXFjNjMb\n",
       "GDdmM7OBcWM2MxsYN2Yzs4GZ25glvV7SDZKuk/RhScf2cWBmZrXqbMySdgOvAE6PiMcDO4AX5z8s\n",
       "M7N67Zyz/07gHmCXpJ8Du4BvZz8qM7OKdX7HHBG3A+8AvgV8BzgQEV/s48DMzGo1b5TxGOBVwG7g\n",
       "4cAJkl7Sw3GZmVVr3ijjycCVEfEDAEmfBJ4GfGh6A0n+YxtmZkchInSkHUf8AH4TuB44DhBwIfAX\n",
       "M7eJrjXmfQBv2s7nDzEXCIiOjzd27Nve/VnbfT3UbNc8juztPZej8/nctW/ejPla4APANcB/N1e/\n",
       "d/GvBwvZveT1hp4LbJQK3l1ZbsnsUrkls0vlFszeyLLqvFEGEfE24G1Z0s3M7BBD+M2/vZXlAntK\n",
       "Be+tLLdkdqncktmlcgtm78myqppZx9EvIEUcaYBdqckPRI/2fhW+P82GYXvPZeh6Pnf1zuLfMUta\n",
       "qyl3IhVJrfG+ds3jzy2bnbKsWrwxm5nZZh5lZOBRhtk4VDvKMDOzzYo35hrnYZ4xjz/bNdeSnbKs\n",
       "Wrwxm5nZZp4xZ+AZs9k4eMZsZmbAABpzjfMwz5jHn+2aa8lOWVYt3pjNzGwzz5gz8IzZbBw8YzYz\n",
       "M2AAjbnGeZhnzOPPds21ZKcsqxZvzGZmtplnzBl4xmw2Dp4xm5kZMIDGXOM8zDPm8We75lqyU5ZV\n",
       "5zZmSY+TtK/1cYekc7IcjZmZbW3GLOkY4NvAUyPi5uY6z5hneMZsNg6rMmN+JvB/06ZsZmbLt9XG\n",
       "/GLgw8s8gBrnYZ4xjz/bNdeSnbKsunBjlnR/4PnAv2U5EjMzA2DnFm77HOCrEXHb7A5Je4GNZvMA\n",
       "sB4Rqdm3BnCk7el1i95+VbYPmpa5NrN9pP357o+ISKXvj77zp9eVfjzUcH+XfHzlfPxMnqNrrcvQ\n",
       "fr7O2z99/DVr72mu3qDDwj/8k/RR4HMRceHM9f7h3wz/8M9sHAb9wz9JxzP5wd8nj/4Aj7j22rLX\n",
       "HHLuRCqSWuN97ZrHn1s2O2VZdaFRRkTcDTwoyxGYmdkm/lsZGXiUYTYOgx5lmJlZf4o35hrnYZ4x\n",
       "jz/bNdeSnbKsWrwxm5nZZp4xZ+AZs9k4eMZsZmbAABpzjfMwz5jHn+2aa8lOWVYt3pjNzGwzz5gz\n",
       "8IzZbBw8YzYzM2AAjbnGeZhnzOPPds21ZKcsqxZvzGZmtplnzBl4xmw2Dp4xm5kZMIDGXOM8zDPm\n",
       "8We75lqyU5ZVizdmMzPbzDPmDDxjNhsHz5jNzAwYQGOucR7mGfP4s11zLdkpy6pzG7OkkyV9XNJ+\n",
       "STdKOiPLkZiZGbDAjFnShcBlEXG+pJ3A8RFxR2u/Z8wzPGM2G4dSM+bOxizpJGBfRPxSx23cmGe4\n",
       "MZuNw1B/+Pdo4DZJF0j6mqR/kbRrG0d5uINbW+Z6Q8+dSEVSa7yvXfP4c8tmpyyrzmvMO4HTgfdE\n",
       "xOnA3cDrshyJmZkBk8bb5Rbgloi4utn+OIdpzJL2AhvN5gFgPSJSs2/u6wCp85X7mQCt9dZWYfug\n",
       "1Py7NrN9pP2TNXIcX0Sk0vdH3/nT63KsP++xPedxTURoTPd3ycdXzsfP5Dm61roM7efrvP3Tx1+z\n",
       "9p7m6g06LPLDvy8DL4+Ib0h6E3BcRLy2tb9zxlzjvLXGmmvk8zx+Q50xA7wS+JCka4EnAG8++oM8\n",
       "nLTc5RbkGfP4c8tmpzKx+Dz3K2VZdd4og4i4FnhKlnQzMztE9r+VUePLvRprrpHP8/gNeZRhZmY9\n",
       "GkBjTkVSPWMef27Z7FQmFp/nfqUsqw6gMZuZWZtnzBnUWHONfJ7HzzNmMzMDBtGYU5FUz5jHn1s2\n",
       "O5WJxee5XynLqgNozGZm1uYZcwY11lwjn+fx84zZzMyAQTTmVCTVM+bx55bNTmVi8XnuV8qy6gAa\n",
       "s5mZtXnGnEGNNdfI53n8PGM2MzNgEI05FUn1jHn8uWWzU5lYfJ77lbKsOoDGbGZmbZ4xZ1BjzTXy\n",
       "eR4/z5jNzAwYRGNORVI9Yx5/btnsVCYWn+d+pSyrzv0//wAkbQB3Aj8H7omIp2Y5GjMzW2zGLOmb\n",
       "wJMi4vbD7POMeUaNNdfI53n8VmHG7AeRmVkPFm3MAXxR0jWSXrHcQ0jLXW5BnjGPP7dsdioTi89z\n",
       "v1KWVReaMQNPj4jvSnowcImkmyLi8ulOSXuBjWbzALAeEengpydgrXWZ1vb6zPbm/dM7fLresrZb\n",
       "x551/UPrTU3Nh693usayj6fw9mnTQvvOB06TlHH9acwam7dhkf1ju79LbU9lePywnf41XTMiUrP2\n",
       "nubqDTps+X3Mkt4I3BUR72i2PWOeUWPNNfJ5Hr/Bzpgl7ZJ0YnP5eODZwHXbOFIzM+uwyIz5FOBy\n",
       "SevAVcBnI+Li5R1CWt5SW+AZ8/hzy2anMrH4PPcrZVl17ow5Ir7JZGZlZmY98N/KyKDGmmvk8zx+\n",
       "g50xm5lZvwbQmFORVM+Yx59bNjuVicXnuV8py6oDaMxmZtbmGXMGNdZcI5/n8fOM2czMgEE05lQk\n",
       "1TPm8eeWzU5lYvF57lfKsuoAGrOZmbV5xpxBjTXXyOd5/DxjNjMzYBCNORVJ9Yx5/Llls1OZWHye\n",
       "+5WyrDqAxmxmZm2eMWdQY8018nkeP8+YzcwMGERjTkVSPWMef27Z7FQmFp/nfqUsqw6gMZuZWZtn\n",
       "zBnUWHONfJ7HzzNmMzMDBtGYU5FUz5jHn1s2O5WJxee5XynLqgs1Zkk7JO2TdFGWozAzs/ssNGOW\n",
       "9FfAk4ATI+IFM/s8Y55RY8018nkev8HOmCWdCjwXeB/gB5KZWWaLjDLeCbwGuDfPIaQ8y87hGfP4\n",
       "c8tmpzKx+Dz3K2VZdWfXTknPA74fEfu6Cpe0F9hoNg8A6xGRDt4iAWuty7S212e2N++f5k7XW9Z2\n",
       "69izrn9ovamp+fD1TtdY9vEU3j5tWmjf+cBpkjKuP41ZY/M2LLJ/bPd3qe2pDI8fttO/pmtGRGrW\n",
       "3tNcvUGHzhmzpDcDfwL8DHgA8EDgExHxp63beMY8o8aaa+TzPH6lZswL/4KJpN8GXh0Rz1908en+\n",
       "2h68NdZcI5/n8RvsD/9mbO/XBA8rLX/JBXjGPP7cstmpTCw+z/1KWVbtnDG3RcRlwGVZjsLMzO7j\n",
       "v5WRQY0118jnefxWZZRhZmaZDaAxpyKpnjGPP7dsdioTi89zv1KWVQfQmM3MrM0z5gxqrLlGPs/j\n",
       "5xmzmZkBg2jMqUiqZ8zjzy2bncrE4vPcr5Rl1QE0ZjMza/OMOYMaa66Rz/P4ecZsZmbAIBpzKpLq\n",
       "GfP4c8tmpzKx+Dz3K2VZdQCN2czM2jxjzqDGmmvk8zx+njGbmRkwiMaciqR6xjz+3LLZqUwsPs/9\n",
       "SllWHUBjNjOzNs+YM6ix5hr5PI+fZ8xmZgYMojGnIqmeMY8/t2x2KhOLz3O/UpZV5zZmSQ+QdJWk\n",
       "dUk3SnpLliMxMzNgwRmzpF0R8SNJO4ErgFdHxBXNPs+YZ9RYc418nsdv0DPmiPhRc/H+wA7g9qM6\n",
       "RjMzm2uhxizpGEnrwK3ApRFx4/IOIS1vqS3wjHn8uWWzU5lYfJ77lbKsunORG0XEvcBpkk4CviBp\n",
       "LSLuOyJJe4GNZvMAsN7ePzn4tdZlWtvrM9ub90/v8Ol6y9puHXvW9Q+tNzU1H77e6RrLPp7c28Cl\n",
       "dJC6X7VPX9It+/iYPG6z1X/489vWvT/T+ThtGpRh/c7X9fPOM3Bmhnrb+UutdyJxtP1rumZEpGbt\n",
       "Pc3VG3TY8vuYJf0d8OOIeHuz7RnzDNe85c92zSuitpoHO2OW9CBJJzeXjwOeBezbxpGamVmHRWbM\n",
       "DwP+s5kxXwVcFBFfWt4hpOUttQWeMfcplYnFNfcrlYllfDXPnTFHxHXA6VnSzczsEP5bGRm45i1/\n",
       "tmteEbXVPNgZs5mZ9WsAjTkVSfWMuU+pTCyuuV+pTCzjq3kAjdnMzNo8Y87ANW/5s13ziqitZs+Y\n",
       "zcwMGERjTkVSPWPuUyoTi2vuVyoTy/hqHkBjNjOzNs+YM3DNW/5s17wiaqvZM2YzMwMG0ZhTkVTP\n",
       "mPuUysTimvuVysQyvpoH0JjNzKzNM+YMXPOWP9s1r4jaavaM2czMgEE05lQk1TPmPqUysbjmfqUy\n",
       "sYyv5gE0ZjMza/OMOQPXvOXPds0roraaPWM2MzNgEI05FUn1jLlPqUwsrrlfqUws46t5kf8l+xGS\n",
       "LpV0g6TrJZ2T5UjMzAxYYMYs6aHAQyNiXdIJwFeBF0bE/ma/Z8wzXPOWP9s1r4jaah7sjDkivhcR\n",
       "683lu4D9wMO3caRmZtZhSzNmSbuBJwJXLe8Q0vKW2gLPmPuUysTimvuVysQyvpp3LnrDZozxceDc\n",
       "5jvn9r69wEazeQBYj4h08BYJWGtdprW9PrO9ef/0Dp+ut6zt1rFnXf/QelNT8+Hrna5xNPmTl13d\n",
       "pLmvJM9cNK+9fdBsPYnueqfb9x3fQnmLbgOnSVr6+T24fnc9meq9lDnmnOczt3F/0v187t7exvNp\n",
       "WzVPRwbLr7e7f03XbJ6fa8Ce5uqNjlIWex+zpPsBnwU+FxH/OLPPM+YZpWrOOQ/Lm+3zvAq5JbNX\n",
       "M7c7e1szZk2+DL0fuHG2KZuZ2fItMmN+OvDHwJmS9jUfZy3vENLyltqCGmfM9eWOb/Y47OxSuSWz\n",
       "8+TOnTFHxBUM4hdRzMzq4L+VkcEY52F5s32eVyG3ZPZq5nZn+29lmJmtkAE05lQk1TPmGnI9Y64j\n",
       "t2R2ntwBNGYzM2vzjDmDMc7D8mb7PK9Cbsns1cztzvaM2cxshQygMaciqZ4x15DrGXMduSWz8+QO\n",
       "oDGbmVmbZ8wZjHEeljfb53kVcktmr2Zud7ZnzGZmK2QAjTkVSfWMuYZcz5jryC2ZnSd3AI3ZzMza\n",
       "PGPOYIzzsLzZPs+rkFsyezVzu7M9YzYzWyEDaMypSKpnzDXkesZcR27J7Dy5A2jMZmbW5hlzBmOc\n",
       "h+XN9nlehdyS2auZ253tGbOZ2QoZQGNORVI9Y64h1zPmOnJLZufJXeR/yT5f0q2SrstyBGZmtsnc\n",
       "GbOkZwB3AR+IiMcfZr9nzDPGOA/Lm+3zvAq5JbNXM7c7e1sz5oi4HPjhNo7MzMy2wDPmIpJze+IZ\n",
       "cw25JbPz5O5cxiKS9gIbzeYBYD0i0sFbJGCtdZnW9vrM9ub90yfWdL2tbE9ehnQed9duIkJHm3/Q\n",
       "5nom2+sc+f6YrHE09R45b/Ht/uudbnO0+XNfZ847z8CZy7+/YZH9q/f4mq55pPW7t/PUu/j+5dfb\n",
       "3b+mazb9aA3Y01y9QYeF3scsaTdw0arNmFdzLjXMeVjebNe8Crkls1cztzvb72M2M1shi7xd7iPA\n",
       "lcBjJd0s6aXLPYS03OUGn1syu7bcktmlcktml8otmZ0nd+6MOSLOzpJsZmaHNeq/lbGac6lhzsPy\n",
       "ZrvmVcgtmb2aud3ZnjGbma2QATTmVFluyezacktml8otmV0qt2R2ntwBNGYzM2vzjDlD9mrmlsx2\n",
       "zauQWzJ7NXO7sz1jNjNbIQNozKmy3JLZteWWzC6VWzK7VG7J7Dy5A2jMZmbW5hlzhuzVzC2Z7ZpX\n",
       "Ibdk9mrmdmd7xmxmtkIG0JhTZbkls2vLLZldKrdkdqncktl5cgfQmM3MrM0z5gzZq5lbMts1r0Ju\n",
       "yezVzO3O9ozZzGyFDKAxp8pyS2bXllsyu1RuyexSuSWz8+QOoDGbmVmbZ8wZslczt2S2a16F3JLZ\n",
       "q5nbne0Zs5nZClnk//w7S9JNkv5H0muXfwhp+UsOOrdkdm25JbNL5ZbMLpVbMjtPbmdjlrQD+Cfg\n",
       "LODXgLMl/epyD2F9ucsNPrdkdm25JbNdcx3ZeXLnfcf8VOB/I2IjIu4BPgr87nIP4cBylxt8bsns\n",
       "2nJLZrvmOrLz5M5rzL8I3NzavqW5zszMMpnXmLf3lo2FbOSPGFRuyezacktml8otmV0qt2R2ntzO\n",
       "t8tJOgN4U0Sc1Wy/Hrg3It7auk0PzdvMbHyO+Fa6OY15J/B14HeA7wBfAc6OiP05DtLMzGBn186I\n",
       "+JmkvwS+AOwA3u+mbGaW17Z/88/MzJar8zvmsWjee/1w4KqIuKt1/VkR8flyR9YPSc9g8tbH6yLi\n",
       "4ow5ZwD7I+IOSbuA1wGnAzcAb46IOzJmnwN8KiJunnvj5eYeC7wY+HZEfFHSS4CnATcC723eZpoz\n",
       "/zHAi4BTgXuZjB4/HBF35sy1vAbxK9mSXppx7XOATwOvBG6Q9MLW7rfkyu04ng/0kPGV1uVXAO8G\n",
       "TgDe2PwAN5fzgbuby+8CHgicB/wYuCBjLsDfA1+RdIWkP5f04Mx5UxcAzwXOlfSvwB8A/8XkC+H7\n",
       "cgZLOhf4Z+DYJu9Y4JHAVZLOzJltmUVE8Q/g5oxrXw+c0FzeDVwDvKrZ3pe5rouAf2/+nX7cPb0+\n",
       "Y+6+1uVrgAc3l48Hrs+Yu791+Wsz+67NfF/vY/KNxrOZfIG4Dfg88GfAiRlzr2v+3Ql8H9jZbGu6\n",
       "L2P29cCO5vIu4LLm8iOB9Yy5JzP5gnsT8EPg9ubyecDJOWuec1yfy7j2SU19HwT+aGbfe5ad19so\n",
       "Q9J1HbsfkjM6mvFFRGxIWgM+IelRTJ48OZ3K5CXt+5i8zBTwZODtmXN3SPqFJm9HRNwGEBF3S/pZ\n",
       "xtwbJL0sIs4HrpX0lIi4WtJjgZ9mzAUgIu4FLgYulnR/4DnA2cA7gAdlij2mGWfsAo5j8gT+AfAA\n",
       "8r8iDeB+wM+bvOMBIuJbku6XMfdjwJeANeDWiAhJD2PyRfBjTL44ZiHp9CPtAp6YK5fJK6NvAJ8A\n",
       "Xibp94GXRMRPgN9adlifM+aHMPmbGz88zL4rM+Z+X9JpEbEOEBF3SXoe8H7gCRlzYdKEzwXeALwm\n",
       "IvZJ+klEXJY594HAV5vLIelhEfFdSSdmzn058C5Jf8vkO9YrJd3C5LdHX545e5OI+CnwGeAzko7P\n",
       "GPVBYD9wD/DXwOWSrgTOAC7MmAuTL/hXS7oKeAbwVgBJD2HyxSGX3dH6XQaAiPgucJ6kl2XMBbga\n",
       "+PIR9p2UMfcxEfGi5vKnJL0B+JKkJf+Jione3pUh6Xzggoi4/DD7PhIRZ2fKfQRwT0R8b+Z6AU+P\n",
       "iCty5M5knQq8k8lL3RdExCNyZx7hOHYBp0TENzPnnAQ8mskX/ltm7/tMmY+LiK/nzjlC9m7gzoi4\n",
       "vflh3JOBmyLi2h6yfwP4FSYjqpty5zWZlwCXABdGxK3NdQ9l8h3zsyLimRmzbwB+LyK+cZh9N+d6\n",
       "bknaD/x686pset0e4DVMRqWPWmpeX43ZoPlO/WkR8Telj8XsaDVjstcBLwBOaa6+lcnPU86LiNsz\n",
       "Zv8hk9n9IV+EJL0wIj6dKfcfgIsj4pKZ688C3h0Rv7zUPDdmM1sWSS+NiNzvwDlS9vTnGyuf68Zs\n",
       "ZkuTc5ww1OwcuVX8gomZLc+cd1id0rFvZbP7znVjNrOtKvUOq5LZvea6MZvZVv0Hk3ci7JvdISn3\n",
       "W0FLZfea6xmzmdnADOJvZZiZ2UFuzGZmA+PGbGY2MG7MZmYD48ZsZjYw/w+Al5x6i4FKUAAAAABJ\n",
       "RU5ErkJggg==\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f90a42ff0b8>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 5. In what months of the year have Helen Mirren movies been most often released?\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Helen Mirren'][['title', 'year']].drop_duplicates()\n",
    "c = c.join(rd, ['title', 'year'])\n",
    "c = c[c.country == 'USA']\n",
    "c.date.dt.month.value_counts().sort_index().plot(kind='bar')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 139,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f90a42990b8>"
      ]
     },
     "execution_count": 139,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n",
       "cW9gcQAAAABJRU5ErkJggg==\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f90a4228978>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 5. …Jeff Bridges movies?\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Jeff Bridges'][['title', 'year']].drop_duplicates()\n",
    "c = c.join(rd, ['title', 'year'])\n",
    "c = c[c.country == 'USA']\n",
    "c.date.dt.month.value_counts().sort_index().plot(kind='bar')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 141,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f90a4144ba8>"
      ]
     },
     "execution_count": 141,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "iVBORw0KGgoAAAANSUhEUgAAAWYAAAEBCAYAAABL1w/0AAAABHNCSVQICAgIfAhkiAAAAAlwSFlz\n",
       "AAALEgAACxIB0t1+/AAAGVtJREFUeJzt3X+MbGddx/H3l1764xYowQYoFr21EeRnf1BIRcCtFNIi\n",
       "FERNaDBwS8ofAgIKhFaMgn8IBAkQhRiB9oIWjFQKlh9SwD4FUgNU7i2FFtCGFRAoDfUWpBZa+/WP\n",
       "c8aZWXbnzO7MOc9n735eSXP37Nk+531nZ587+93Z3chMzMxMx91qB5iZ2TRvzGZmYrwxm5mJ8cZs\n",
       "ZibGG7OZmRhvzGZmYjo35oh4SURcFxFfioiXDBFlZraTzdyYI+LhwPnAo4GTgKdGxIlDhJmZ7VRd\n",
       "j5h/CfhsZt6emf8LXAU8s/8sM7Odq2tj/hLw+Ii4T0TsBn4dOL7/LDOznWvXrJOZ+ZWIeD1wBfAj\n",
       "YD9w1xBhZmY7VWzmZ2VExJ8B38jMv5p4nX/YhpnZFmRmbHRi5n/Afds/fw64AbjXmvPZtcYc13j1\n",
       "omss4z+FDoUGlQ6FBpUOhQaVjiEagITs+O9POs6TXdfY6NzMUUbr0oj4GeAO4AWZ+YNN/ZMwnz09\n",
       "rLkVe2oHoNEAGh17age09tQOQKMBNDr21A5orPa2cufGnJlP6O3qZmb2U1S+829f7YDWvtoBaDSA\n",
       "Rse+2gGtfbUD0GgAjY59tQMae3tbeVNf/Ft3gYjMjQbYZmbbUPOkhkWf1xDM2htn7Z0Sj5gjYqV2\n",
       "A2h0KDSARodCA2h0KDSARodCQ6P0trLExmxmZmMeZZiZreFRhpmZTZHYmFVmRgodCg2g0aHQABod\n",
       "Cg2g0aHQ0Ci9rSyxMZuZ2ZhnzGZma3jGbGZmUyQ2ZpWZkUKHQgNodCg0gEaHQgNodCg0NEpvK0ts\n",
       "zGZmNuYZs5nZGp4xm5nZFImNWWVmpNCh0AAaHQoNoNGh0AAaHQoNjdLbyhIbs5mZjXXOmCPiQuB3\n",
       "aH4J63XAeZn544nznjGb2SFFesYcEXuA5wOnZuYjgMOAZ2091MzMunSNMn5A87v+dkfELmA38J/L\n",
       "jlCZGSl0KDSARodCA2h0KDSARodCQ6P0tvLMjTkzbwHeCHwD+DZwMDM/0VuNmZnNnjFHxInA5cDj\n",
       "gVuB9wGXZuYlE2/jGbOZHVJqz5i7fkv2acDVmfn9dqH3A48FLpl8o4jYx/h3eR8EDmRmac+tAPjY\n",
       "xz728XY5HivtnytbOp5cv315b/sGq8zQ9Yj5JJpN+NHA7TS/nfZzmfnWibdZ+BFzRKyMbpiaFDoU\n",
       "GlQ6FBpUOhQaVDqGaJjvEXNhvCGvu0o/z8rIzGuBdwPXAF9sX/3Xs/4fMzNbjH9WhpnZGrVnzP7O\n",
       "PzMzMRIbs8rzEhU6FBpAo0OhATQ6FBpAo0OhoVF6W1liYzYzszHPmM3M1vCM2czMpkhszCozI4UO\n",
       "hQbQ6FBoAI0OhQbQ6FBoaJTeVpbYmM3MbMwzZjOzNTxjNjOzKRIbs8rMSKFDoQE0OhQaQKNDoQE0\n",
       "OhQaGqW3lSU2ZjMzG/OM2cxsDc+YzcxsisTGrDIzUuhQaACNDoUG0OhQaACNDoWGRultZYmN2czM\n",
       "xjxjNjNbQ37GHBEPjoj9E//dGhEvXiTXzMw21rkxZ+ZXM/OUzDwFeBRwG3DZMiNUZkYKHQoNoNGh\n",
       "0AAaHQoNoNGh0NAova282RnzmcCNmfnNPmLMzGyTM+aIuAi4JjPfNvE6z5jN7JBSe8a8a+5LRBwO\n",
       "PA145Trn9gGr7eFB4MDo14uPPu3wsY/XHjd3/qU4Q+Hv4+ND53istH+ubOl4zf19BdjbvsEqM8z9\n",
       "iDking78bmaeteb1Cz9ijoiV0Q1Tk0KHQsNQHd2PSgrjO/yGq8x8VLIMCu8ThQaVDo37JnTfP4f5\n",
       "zr9zgfdu4u3NzGwL5nrEHBFHA/8BnJCZP1xzzjNm25Ih5nhmW7EtZsyZ+SPg2C3WmZnZJkh8S7bK\n",
       "8xIVOhQaQKWj1A4ANG4LhQbQ6FBoaJTeVpbYmM3MbMw/K8Oq8YzZVNWeMfsRs5mZGImNWWVmpNCh\n",
       "0AAqHaV2AKBxWyg0gEaHQkOj9LayxMZsZmZjnjFbNZ4xmyrPmM3MbIrExqwyM1LoUGgAlY5SOwDQ\n",
       "uC0UGkCjQ6GhUXpbWWJjNjOzMc+YrRrPmE2VZ8xmZjZFYmNWmRkpdCg0gEpHqR0AaNwWCg2g0aHQ\n",
       "0Ci9rSyxMZuZ2ZhnzFaNZ8ymyjNmMzOb0rkxR8S9I+LSiLghIq6PiNOXHaEyM1LoUGgAlY5SOwDQ\n",
       "uC0UGkCjQ6GhUXpbeZ7fYPIW4COZ+VsRsQs4urcaMzObPWOOiGOA/Zn5CzPexjNm2xLPmE2V+oz5\n",
       "BODmiLg4Ir4QEW+PiN2LpJqZ2Wxdo4xdwKnAizLz8xHxZuAC4I8n3ygi9gGr7eFB4EBmlvbcCkDH\n",
       "8cmZ+eZNvH0vx5OzqxrXb49fuoXbb+nHa2+Tvq43ntONLjt5PHp5o/ONiFjp+faofv8cva7mx0d7\n",
       "rHD/7P39MVbaP1fWOS4Tb7fe+XX3l73tG6wyQ9co4/7Av2TmCe3x44ALMvOpE2+z8Chj8gOrJoUO\n",
       "hYahOro/XSxMbsAbrNL7KEPhfaLQoNKhcd+E7vvn1kcZnc9jjohPAedn5tci4tXAUZn5ynkWN5vF\n",
       "M2ZTVXvGPM+zMn4PuCQiDgduBM7bWqSZmc2j83nMmXltZj46M0/KzGdm5q3LjlB5XqJCh0IDqHSU\n",
       "2gGAxm2h0AAaHQoNjdLbyv7OPzMzMf5ZGVaNZ8ymqvaM2Y+YzczESGzMKjMjhQ6FBlDpKLUDAI3b\n",
       "QqEBNDoUGhqlt5UlNmYzMxvzjNmq8YzZVHnGbGZmUyQ2ZpWZkUKHQgOodJTaAYDGbaHQABodCg2N\n",
       "0tvKEhuzmZmNecZs1XjGbKo8YzYzsykSG7PKzEihQ6EBVDpK7QBA47ZQaACNDoWGRultZYmN2czM\n",
       "xjxjtmo8YzZVnjGbmdmUuTbmiFiNiC9GxP6I+NyyI1RmRgodCg2g0lFqBwAat4VCA2h0KDQ0Sm8r\n",
       "z/MbTKB5TL+Smbf0VmJmZsCcM+aI+DpwWmZ+f51znjHblnjGbKq2y4w5gU9ExDUR8fytJJqZ2Xzm\n",
       "3Zh/JTNPAc4GXhgRj19mhMrMSKFDoQFUOkrtAEDjtlBoAI0OhYZG6W3luWbMmfmd9s+bI+Iy4DHA\n",
       "p0fnI2IfsNoeHgQOZGZpz620/++s45Np/5Zzvv0hewycHBF9X+9K5hAxe0KQmbH433f0115ha8fN\n",
       "mgvcHnN9vjrPbbHF6891PPl37WN9sftn9f1ibPTXXtnS8eT67ct72zdYZYbOGXNE7AYOy8wfRsTR\n",
       "wBXAazLziva8Z8zbjMpsV6FDocH01J4xz/OI+X7AZe0jhl3AJaNN2czMlq9zxpyZX8/Mk9v/Hp6Z\n",
       "r112hMrMSKFDoaFRageg0QAKHSr3C4UOhYZG6W1lf+efmZkY/6yMHUhlrqrQodBgemrPmP2I2cxM\n",
       "jMTGrDIzUuhQaGiU2gFoNIBCh8r9QqFDoaFReltZYmM2M7Mxz5h3IJW5qkKHQoPp8YzZzMymSGzM\n",
       "KjMjhQ6FhkapHYBGAyh0qNwvFDoUGhqlt5UlNmYzMxvzjHkHUpmrKnQoNJgez5jNzGyKxMasMjNS\n",
       "6FBoaJTaAWg0gEKHyv1CoUOhoVF6W1liYzYzszHPmHcglbmqQodCg+nxjNnMzKZIbMwqMyOFDoWG\n",
       "RqkdgEYDKHSo3C8UOhQaGqW3lefamCPisIjYHxGX91ZiZmbAnDPmiPgD4FHAPTPznDXnPGPeZlTm\n",
       "qgodCg2mR37GHBHHA08B3gH4zmdm1rN5RhlvAl4B3NVXhMrMSKFDoaFRageg0QAKHSr3C4UOhYZG\n",
       "6W3lmRtzRDwV+F5m7sePls3MBrGr4/xjgXMi4inAkcC9IuLdmfmcyTeKiH3Aant4EDiQmaU9twLQ\n",
       "dTyx1lxv38dxZpaa15+8Dfq+3tjosiubPB63Lvb3nXW9lTl6Fru9xmtutP7Em81xvvb951C5f9be\n",
       "L8ZGf+2VdY5XOs5Pr9++vLd9g1VmmPsbTCLiV4GXZ+bT1rzeX/zbZlS+4KXQodBgeuS/+LfGoqXr\n",
       "UpkZKXQoNDRK7QA0GkChQ+V+odCh0NAova3cNcr4f5l5FXBVbyVmZgb4Z2XsSCqfvit0KDSYnu02\n",
       "yjAzs55JbMwqMyOFDoWGRqkdgEYDKHSo3C8UOhQaGqW3lSU2ZjMzG/OMeQdSmasqdCg0mB7PmM3M\n",
       "bIrExqwyM1LoUGholNoBaDSAQofK/UKhQ6GhUXpbWWJjNjOzMc+YdyCVuapCh0KD6fGM2czMpkhs\n",
       "zCozI4UOhYZGqR2ARgModKjcLxQ6FBoapbeVJTZmMzMb84x5B1KZqyp0KDSYHs+YzcxsisTGrDIz\n",
       "UuhQaGiU2gFoNIBCh8r9QqFDoaFReltZYmM2M7OxzhlzRBxJ8wPyjwAOBz6YmRdOnPeMeZtRmasq\n",
       "dCg0mJ7aM+bO32CSmbdHxBmZeVtE7AI+ExGPy8zPLFBsZmYbmGuUkZm3tS8eDhwG3LLMCJWZkUKH\n",
       "QkOj1A5AowEUOlTuFwodCg2N0tvKc23MEXG3iDgA3ARcmZnX91ZkZrbDbep5zBFxDPAx4ILMLO3r\n",
       "PGPeZlTmqgodCg2mR37GPCkzb42IDwOnMfE4PiL2Aavt4UHgwMTGvdL+vz5m9A5f3OgdutWesdL+\n",
       "ubLJ48ait8fWrz86btbc+vVHa271+hPLbOH6E++PK1lQZobA/XsZx0u5LRbpGSvtnytbOp5cv315\n",
       "b/sGq7P653lWxrHAnZl5MCKOonnE/JrM/GR7fuFHzJMfWDUN0dH9L3FhctPZYJUBHiV2dQzxiLmr\n",
       "YfGOQ+e2GOZR+/b4GBnqs7nFOhZ9xHwc8K6IuBvNTPpvRpuymZktn39WxsAUZpoKDSodCg3L6Th0\n",
       "5twKt0XtGbO/88/MTIzExqzyvESNjlI7oFVqB6DRABodpXYA4I+RaaW3lSU2ZjMzG/OMeWAKM02F\n",
       "BpUOhYbldHjGPLGCwPuju8MzZjOzbURiY9aYW6l0lNoBrVI7AI0G0OgotQMAf4xMK72tLLExm5nZ\n",
       "mGfMA1OYaSo0qHQoNCynwzPmiRUE3h/dHZ4xm5ltIxIbs8bcSqWj1A5oldoBaDSARkepHQD4Y2Ra\n",
       "6W1liY3ZzMzGPGMemMJMU6FBpUOhYTkdnjFPrCDw/uju8IzZzGwbkdiYNeZWKh2ldkCr1A5AowE0\n",
       "OkrtAMAfI9NKbytLbMxmZjbmGfPAFGaaCg0qHQoNy+nwjHliBYH3R3fHQjPmiHhgRFwZEV+OiC9F\n",
       "xIsXSTUzs9nmGWXcAfx+Zj4MOB14YUQ8ZJkRGnMrlY5SO6BVageg0QAaHaV2AOCPkWmlt5U7N+bM\n",
       "/G5mHmhf/m/gBuABvRWZme1wm5oxR8Qe4CrgYe0m7RnzJinMNBUaVDoUGpbT4RnzxAoC74/ujkV/\n",
       "S/ZokXsAlwIvGW3KE+f2Aavt4UHgwOhXnLef+lw573VmycwYfSq1Zv1tc9wojH/t+ejVmz1ubLVn\n",
       "umX4649vj61ef3TcrOn3x2LXz8zSbEZLccaiHy9jpf1zZZPHjXrXX/mp67cv723fYJUZ5nrEHBF3\n",
       "Bz4EfDQz37zmXOcj5u5/fQqTH2gbrNL7I4LJD/Aer1H9tpjv0UBXxxCPSroaFu84dG6LoR4lKnQo\n",
       "NCzeseizMgJ4J3D92k3ZzMyWr/MRc0Q8DvgU8EXG/4RcmJn/1J5fwiPmuVIPiRmawm2h0KDSodCw\n",
       "nA6FBpUOhYbujoVmzJn5GfwdgmZmgxHZcEvtAMDP0ZxWageg0QAaHaV2QKvUDkCjAfyzMszMdpBB\n",
       "flaGyuxKgcJtodCg0qHQsJwOhQaVDoWG7g7/PGYzs21EZGMutQMAz5inldoBaDSARkepHdAqtQPQ\n",
       "aADPmM3MdhDPmAemcFsoNKh0KDQsp0OhQaVDoaG7wzNmM7NtRGRjLrUDAM+Yp5XaAWg0gEZHqR3Q\n",
       "KrUD0GgAz5jNzHYQz5gHpnBbKDSodCg0LKdDoUGlQ6Ghu8MzZjOzbURkYy61AwDPmKeV2gFoNIBG\n",
       "R6kd0Cq1A9BoAM+Yzcx2EM+YB6ZwWyg0qHQoNCynQ6FBpUOhobvDM2Yzs21knl8tdVFE3BQR1/WX\n",
       "UfpbehM8Y55Uageg0QAaHaV2QKvUDkCjAWrPmC8GzuqtwMzMpsz7W7L3AJdn5iPWOecZ8yYo3BYK\n",
       "DSodCg3L6VBoUOlQaOju8IzZzGwb6fxlrPOIiH3Aant4EDiQmaU9tzL91qX9c2Xi+ADw0hnnp661\n",
       "ArB2/a5j4Mq5/jLdztjK9UfHjcJP//1Gx28GTp5xfmKZLVx/vvcHE6/r5/rj22Oj9SevvdH5cUN/\n",
       "74/CQPfPOdZf6e36870/oPv+udj7Q2i/6Fh/hXnun5Prty/vbd9glRlERhmFyXfsBqsM8ClrV8cQ\n",
       "nyJ1NSze4dtiMw3zdCjcFkN9+q7QodCweMesvVNkY56HZ4nL6lBoUOlQaFhOh0KDSodCQ3fHQjPm\n",
       "iHgvcDXwoIj4ZkSct/VQMzPr0rkxZ+a5mfmAzDwiMx+YmRcvP6Msf8ktKbUD0GgAjY5SO6BVageg\n",
       "0QAaHaV2QKv0trKflWFmJmbH/KwMhQaVDoUGlQ6FhuV0KDSodCg0dHf4ecxmZtuIyMZcage0Su0A\n",
       "NBpAo6PUDmiV2gFoNIBGR6kd0Cq9rSyyMZuZ2YhnzAM2qHQoNKh0KDQsp0OhQaVDoaG7wzNmM7Nt\n",
       "RGRjLrUDWqV2ABoNoNFRage0Su0ANBpAo6PUDmiV3lYW2ZjNzGzEM+YBG1Q6FBpUOhQaltOh0KDS\n",
       "odDQ3eEZs5nZNiKyMZfaAa1SOwCNBtDoKLUDWqV2ABoNoNFRage0Sm8ri2zMZmY24hnzgA0qHQoN\n",
       "Kh0KDcvpUGhQ6VBo6O7wjNnMbBuZ5wflnxURX4mIf4uIV/aTUfpZdtNK7QA0GkCjo9QOaJXaAWg0\n",
       "gEZHqR3QKr2tPHNjjojDgL8EzgIeCpwbEQ9ZfsaB5S+5JQodCg2g0aHQABodCg2g0aHQAH12dD1i\n",
       "fgzw75m5mpl3AH8HPH35GQeXv+SWKHQoNIBGh0IDaHQoNIBGh0ID9NnRtTH/LPDNieNvta8zM7Oe\n",
       "dG3Mi35Zck6rw1ym02rtADQaQKNjtXZAa7V2ABoNoNGxWjugtdrbyjOfLhcRpwOvzsyz2uMLgbsy\n",
       "8/UTbzPQ5m1mdmjZ6OlyXRvzLuCrwBOBbwOfA87NzBv6iDQzM9g162Rm3hkRLwI+BhwGvNObsplZ\n",
       "vxb+zj8zM1uuHfudfxHxuIh4aPvySkS8PCKeWLurtoh4fES8LCKePOA1T4+IY9qXd0fEn0bEhyLi\n",
       "9aPXD9Tx4oh44FDX26DhiIh4bkSc2R4/OyLeGhEvjIi712yz4cg8Yo6I8zLz4oGu9VrgDJrxzJXA\n",
       "E4APA08CLs/MNwzRsU7XuzPzOQNf83OZ+Zj25ecDLwQuA54MfCgzXztAw/XAI9vR2duBHwGXAme2\n",
       "r39m3w1tx63AbcCNwHuA92XmzUNce6LhPTT3y900T5S9B/B+mtuCzHzukD1Wh9LG/M3MHOTRymgj\n",
       "AA4HbgKOz8xbI+Io4LOZ+cgBGi6neTri5Fdlfw34ZyAz85y+G9qO/Zl5SvvyNcDZmXlzRBxNc1s8\n",
       "fICGGzLzIe3LX8jMUyfOXZuZJ/Xd0F5rP/Aomk3wWcDTgH8F3gu8PzN/OEDDdZn5iPYL798GHtD+\n",
       "gxXAFzPzEX03tB33Bi4AngHcj+a++j3gA8DrMrPqd3lExEcz8+yBrnUMcCFwPPCRzHzPxLm3ZeYL\n",
       "ln3NmV/8W7aIuG7G6fsOFgI/ycw7gTsj4sbMvBUgM/8nIu4aqOF44HrgHcBdNBv0acCfD3T9kcMi\n",
       "4j7t9Q8bPULMzB9FxJ0DNXw5Ip6XmRcB10bEozPz8xHxIOAnAzUAkJl3AVcAV0TE4cDZwLnAG4Fj\n",
       "B0i4W0QcQfOI+SjgGOD7wJEMO3r8e+CTwApwU2ZmRBwHPLc91/uoKyJO3egUcErf159wMfA14B+A\n",
       "50XEbwLPzszbgV/u44KDbsw0m+9ZwH+tc+7qATt+HBG7M/M2YPLR2b1pNskhnAa8BHgV8IrM3B8R\n",
       "t2fmVQNdf+ReNI8KATIijsvM70TEPQdsOB94S0T8EXAzcHVEfIvmu07PH7BjSmb+BPgg8MH2M4gh\n",
       "/C1wA3AH8DLg0xFxNXA68K6BGgD2TH6/AkBmfgd4XUQ8b6CGzwOf2uDcYF97AE6cGKddFhGvAj4Z\n",
       "ET38eIrGoKOMiLgIuDgzP73Oufdm5rkDdRzZ/mu39vXHAsdl5qxH9stuOR54E82niecMNc7pEhG7\n",
       "gftl5tcHvOYxwAk0Dxi+lZnfHera7fUfnJlfHfKaG3TsAX6QmbdExIk0/4h/JTOvHbDh48DHgXdl\n",
       "5k3t6+5P84j5SZl55gANXwZ+IzO/ts65IUefNwAPaz+bGr1uL/AK4B6Z+fNLv6bKjHmni4inAo/N\n",
       "zD+s3WLWjrcuAM6hmTFD8/WYf6SZMd8yQMNvA9dl5lfWOfeMzPxA3w3ttd4AXJGZH1/z+rOAv8jM\n",
       "X1z6Nb0xm9lmDPkMqhkNo69JVNVXhzdmM9uUIccIyg19dgz9xT8z2wY6nkF1vxnnDqmGWh3emM1s\n",
       "PQrPoFJoqNLhjdnM1vNhmmcc7F97IiKGekqnQkOVDs+YzczE7NgfYmRmpsobs5mZGG/MZmZivDGb\n",
       "mYnxxmxmJub/AC+y94SeOxsMAAAAAElFTkSuQmCC\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f90a4156a90>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "# 5. …Tom Cruise movies?\n",
    "\n",
    "c = cast\n",
    "c = c[c.name == 'Tom Cruise'][['title', 'year']].drop_duplicates()\n",
    "c = c.join(rd, ['title', 'year'])\n",
    "c = c[c.country == 'USA']\n",
    "c.date.dt.month.value_counts().sort_index().plot(kind='bar')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 155,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "CPU times: user 19.8 s, sys: 3.83 s, total: 23.6 s\n",
      "Wall time: 23.7 s\n"
     ]
    }
   ],
   "source": [
    "%%time\n",
    "# 5. Use join() to build a table of release dates indexed by actor,\n",
    "#    and use it to re-run the previous three questions efficiently.\n",
    "\n",
    "c = cast\n",
    "c = c[['name', 'title', 'year']]\n",
    "c = c.join(rd, ['title', 'year'])\n",
    "c = c[c.country == 'USA']\n",
    "c = c.set_index('name').sort_index()\n",
    "releases = c\n",
    "releases.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 178,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "<matplotlib.axes._subplots.AxesSubplot at 0x7f90a3bcca90>"
      ]
     },
     "execution_count": 178,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": [
       "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\n",
       "QmCC\n"
      ],
      "text/plain": [
       "<matplotlib.figure.Figure at 0x7f90a3bf5b70>"
      ]
     },
     "metadata": {},
     "output_type": "display_data"
    }
   ],
   "source": [
    "releases.loc['Tom Cruise'].date.dt.month.value_counts().sort_index().plot(kind='bar')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 182,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "# pivot(self, index=None, columns=None, values=None)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 183,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>The Core</td>\n",
       "      <td>2003</td>\n",
       "      <td>Alejandro Abellan</td>\n",
       "      <td>actor</td>\n",
       "      <td>U.S.S. Soldier</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Il momento di uccidere</td>\n",
       "      <td>1968</td>\n",
       "      <td>Remo De Angelis</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Across the Divide</td>\n",
       "      <td>1921</td>\n",
       "      <td>Thomas Delmar</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Revan</td>\n",
       "      <td>2012</td>\n",
       "      <td>Diego James</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Un homme marche dans la ville</td>\n",
       "      <td>1950</td>\n",
       "      <td>Fabien Loris</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                           title  year               name   type  \\\n",
       "0                       The Core  2003  Alejandro Abellan  actor   \n",
       "1         Il momento di uccidere  1968    Remo De Angelis  actor   \n",
       "2              Across the Divide  1921      Thomas Delmar  actor   \n",
       "3                          Revan  2012        Diego James  actor   \n",
       "4  Un homme marche dans la ville  1950       Fabien Loris  actor   \n",
       "\n",
       "        character   n  \n",
       "0  U.S.S. Soldier NaN  \n",
       "1            Dago   9  \n",
       "2            Dago   4  \n",
       "3            Dago NaN  \n",
       "4            Dago  12  "
      ]
     },
     "execution_count": 183,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cast.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 205,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1197089</th>\n",
       "      <td>Unbecoming Age</td>\n",
       "      <td>1992</td>\n",
       "      <td>George Clooney</td>\n",
       "      <td>actor</td>\n",
       "      <td>Mac</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2023017</th>\n",
       "      <td>The Harvest</td>\n",
       "      <td>1992</td>\n",
       "      <td>George Clooney</td>\n",
       "      <td>actor</td>\n",
       "      <td>Lip Syncing Transvestite</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                  title  year            name   type  \\\n",
       "1197089  Unbecoming Age  1992  George Clooney  actor   \n",
       "2023017     The Harvest  1992  George Clooney  actor   \n",
       "\n",
       "                        character   n  \n",
       "1197089                       Mac   5  \n",
       "2023017  Lip Syncing Transvestite  23  "
      ]
     },
     "execution_count": 205,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = cast\n",
    "c = c[c.year >= 1990]\n",
    "c = c[c.year <= 1993]\n",
    "c = c[c.name == 'George Clooney']\n",
    "#c = c[c.title == 'Inception']\n",
    "#c = c[c.n.notnull()]\n",
    "#c = c.pivot('name', 'year', 'title')\n",
    "c.fillna('')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 206,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>country</th>\n",
       "      <th>date</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>0_1_0</td>\n",
       "      <td>2008</td>\n",
       "      <td>Poland</td>\n",
       "      <td>2008-11-14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Ai no Sanka</td>\n",
       "      <td>1967</td>\n",
       "      <td>Japan</td>\n",
       "      <td>1967-01-01</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>A Thousand to One</td>\n",
       "      <td>1920</td>\n",
       "      <td>USA</td>\n",
       "      <td>1920-12-05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>A Prince of a King</td>\n",
       "      <td>1923</td>\n",
       "      <td>USA</td>\n",
       "      <td>1923-10-13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>A Prince of a King</td>\n",
       "      <td>1923</td>\n",
       "      <td>Netherlands</td>\n",
       "      <td>1924-08-08</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                title  year      country       date\n",
       "0               0_1_0  2008       Poland 2008-11-14\n",
       "1         Ai no Sanka  1967        Japan 1967-01-01\n",
       "2   A Thousand to One  1920          USA 1920-12-05\n",
       "3  A Prince of a King  1923          USA 1923-10-13\n",
       "4  A Prince of a King  1923  Netherlands 1924-08-08"
      ]
     },
     "execution_count": 206,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "release_dates.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 218,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th>country</th>\n",
       "      <th>UK</th>\n",
       "      <th>USA</th>\n",
       "      <th>Ukraine</th>\n",
       "      <th>United Arab Emirates</th>\n",
       "      <th>Uruguay</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>title</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode I - The Phantom Menace</th>\n",
       "      <td>1999-07-16</td>\n",
       "      <td>1999-05-19</td>\n",
       "      <td>NaT</td>\n",
       "      <td>1999-08-25</td>\n",
       "      <td>1999-07-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode II - Attack of the Clones</th>\n",
       "      <td>2002-05-16</td>\n",
       "      <td>2002-05-16</td>\n",
       "      <td>2002-06-08</td>\n",
       "      <td>2002-05-16</td>\n",
       "      <td>2002-07-05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode III - Revenge of the Sith</th>\n",
       "      <td>2005-05-19</td>\n",
       "      <td>2005-05-19</td>\n",
       "      <td>NaT</td>\n",
       "      <td>2005-05-19</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode IX</th>\n",
       "      <td>NaT</td>\n",
       "      <td>2019-01-01</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode V - The Empire Strikes Back</th>\n",
       "      <td>1980-05-21</td>\n",
       "      <td>1980-06-20</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "      <td>1981-01-15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode VI - Return of the Jedi</th>\n",
       "      <td>1983-06-02</td>\n",
       "      <td>1983-05-25</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode VII - The Force Awakens</th>\n",
       "      <td>2015-12-18</td>\n",
       "      <td>2015-12-18</td>\n",
       "      <td>2015-12-17</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode VIII</th>\n",
       "      <td>2017-05-26</td>\n",
       "      <td>2017-05-26</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "country                                                UK        USA  \\\n",
       "title                                                                  \n",
       "Star Wars: Episode I - The Phantom Menace      1999-07-16 1999-05-19   \n",
       "Star Wars: Episode II - Attack of the Clones   2002-05-16 2002-05-16   \n",
       "Star Wars: Episode III - Revenge of the Sith   2005-05-19 2005-05-19   \n",
       "Star Wars: Episode IX                                 NaT 2019-01-01   \n",
       "Star Wars: Episode V - The Empire Strikes Back 1980-05-21 1980-06-20   \n",
       "Star Wars: Episode VI - Return of the Jedi     1983-06-02 1983-05-25   \n",
       "Star Wars: Episode VII - The Force Awakens     2015-12-18 2015-12-18   \n",
       "Star Wars: Episode VIII                        2017-05-26 2017-05-26   \n",
       "\n",
       "country                                           Ukraine  \\\n",
       "title                                                       \n",
       "Star Wars: Episode I - The Phantom Menace             NaT   \n",
       "Star Wars: Episode II - Attack of the Clones   2002-06-08   \n",
       "Star Wars: Episode III - Revenge of the Sith          NaT   \n",
       "Star Wars: Episode IX                                 NaT   \n",
       "Star Wars: Episode V - The Empire Strikes Back        NaT   \n",
       "Star Wars: Episode VI - Return of the Jedi            NaT   \n",
       "Star Wars: Episode VII - The Force Awakens     2015-12-17   \n",
       "Star Wars: Episode VIII                               NaT   \n",
       "\n",
       "country                                        United Arab Emirates    Uruguay  \n",
       "title                                                                           \n",
       "Star Wars: Episode I - The Phantom Menace                1999-08-25 1999-07-02  \n",
       "Star Wars: Episode II - Attack of the Clones             2002-05-16 2002-07-05  \n",
       "Star Wars: Episode III - Revenge of the Sith             2005-05-19        NaT  \n",
       "Star Wars: Episode IX                                           NaT        NaT  \n",
       "Star Wars: Episode V - The Empire Strikes Back                  NaT 1981-01-15  \n",
       "Star Wars: Episode VI - Return of the Jedi                      NaT        NaT  \n",
       "Star Wars: Episode VII - The Force Awakens                      NaT        NaT  \n",
       "Star Wars: Episode VIII                                         NaT        NaT  "
      ]
     },
     "execution_count": 218,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r = release_dates\n",
    "r = r[r.title.str.startswith('Star Wars: Episode')]\n",
    "r = r[r.country.str.startswith('U')]\n",
    "r.pivot('title', 'country', 'date')\n",
    "#r.pivot('country', 'title', 'date')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 227,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr>\n",
       "      <th></th>\n",
       "      <th colspan=\"5\" halign=\"left\">date</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>country</th>\n",
       "      <th>UK</th>\n",
       "      <th>USA</th>\n",
       "      <th>Ukraine</th>\n",
       "      <th>United Arab Emirates</th>\n",
       "      <th>Uruguay</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>title</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode I - The Phantom Menace</th>\n",
       "      <td>1999-07-16</td>\n",
       "      <td>1999-05-19</td>\n",
       "      <td>NaT</td>\n",
       "      <td>1999-08-25</td>\n",
       "      <td>1999-07-02</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode II - Attack of the Clones</th>\n",
       "      <td>2002-05-16</td>\n",
       "      <td>2002-05-16</td>\n",
       "      <td>2002-06-08</td>\n",
       "      <td>2002-05-16</td>\n",
       "      <td>2002-07-05</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode III - Revenge of the Sith</th>\n",
       "      <td>2005-05-19</td>\n",
       "      <td>2005-05-19</td>\n",
       "      <td>NaT</td>\n",
       "      <td>2005-05-19</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode IX</th>\n",
       "      <td>NaT</td>\n",
       "      <td>2019-01-01</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode V - The Empire Strikes Back</th>\n",
       "      <td>1980-05-21</td>\n",
       "      <td>1980-06-20</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "      <td>1981-01-15</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode VI - Return of the Jedi</th>\n",
       "      <td>1983-06-02</td>\n",
       "      <td>1983-05-25</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode VII - The Force Awakens</th>\n",
       "      <td>2015-12-18</td>\n",
       "      <td>2015-12-18</td>\n",
       "      <td>2015-12-17</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Star Wars: Episode VIII</th>\n",
       "      <td>2017-05-26</td>\n",
       "      <td>2017-05-26</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "      <td>NaT</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                                                     date             \\\n",
       "country                                                UK        USA   \n",
       "title                                                                  \n",
       "Star Wars: Episode I - The Phantom Menace      1999-07-16 1999-05-19   \n",
       "Star Wars: Episode II - Attack of the Clones   2002-05-16 2002-05-16   \n",
       "Star Wars: Episode III - Revenge of the Sith   2005-05-19 2005-05-19   \n",
       "Star Wars: Episode IX                                 NaT 2019-01-01   \n",
       "Star Wars: Episode V - The Empire Strikes Back 1980-05-21 1980-06-20   \n",
       "Star Wars: Episode VI - Return of the Jedi     1983-06-02 1983-05-25   \n",
       "Star Wars: Episode VII - The Force Awakens     2015-12-18 2015-12-18   \n",
       "Star Wars: Episode VIII                        2017-05-26 2017-05-26   \n",
       "\n",
       "                                                           \\\n",
       "country                                           Ukraine   \n",
       "title                                                       \n",
       "Star Wars: Episode I - The Phantom Menace             NaT   \n",
       "Star Wars: Episode II - Attack of the Clones   2002-06-08   \n",
       "Star Wars: Episode III - Revenge of the Sith          NaT   \n",
       "Star Wars: Episode IX                                 NaT   \n",
       "Star Wars: Episode V - The Empire Strikes Back        NaT   \n",
       "Star Wars: Episode VI - Return of the Jedi            NaT   \n",
       "Star Wars: Episode VII - The Force Awakens     2015-12-17   \n",
       "Star Wars: Episode VIII                               NaT   \n",
       "\n",
       "                                                                                \n",
       "country                                        United Arab Emirates    Uruguay  \n",
       "title                                                                           \n",
       "Star Wars: Episode I - The Phantom Menace                1999-08-25 1999-07-02  \n",
       "Star Wars: Episode II - Attack of the Clones             2002-05-16 2002-07-05  \n",
       "Star Wars: Episode III - Revenge of the Sith             2005-05-19        NaT  \n",
       "Star Wars: Episode IX                                           NaT        NaT  \n",
       "Star Wars: Episode V - The Empire Strikes Back                  NaT 1981-01-15  \n",
       "Star Wars: Episode VI - Return of the Jedi                      NaT        NaT  \n",
       "Star Wars: Episode VII - The Force Awakens                      NaT        NaT  \n",
       "Star Wars: Episode VIII                                         NaT        NaT  "
      ]
     },
     "execution_count": 227,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "r = release_dates\n",
    "r = r[r.title.str.startswith('Star Wars: Episode')]\n",
    "r = r[r.country.str.startswith('U')]\n",
    "r.set_index(['title', 'country'])[['date']].unstack()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 228,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>The Core</td>\n",
       "      <td>2003</td>\n",
       "      <td>Alejandro Abellan</td>\n",
       "      <td>actor</td>\n",
       "      <td>U.S.S. Soldier</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Il momento di uccidere</td>\n",
       "      <td>1968</td>\n",
       "      <td>Remo De Angelis</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Across the Divide</td>\n",
       "      <td>1921</td>\n",
       "      <td>Thomas Delmar</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Revan</td>\n",
       "      <td>2012</td>\n",
       "      <td>Diego James</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Un homme marche dans la ville</td>\n",
       "      <td>1950</td>\n",
       "      <td>Fabien Loris</td>\n",
       "      <td>actor</td>\n",
       "      <td>Dago</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                           title  year               name   type  \\\n",
       "0                       The Core  2003  Alejandro Abellan  actor   \n",
       "1         Il momento di uccidere  1968    Remo De Angelis  actor   \n",
       "2              Across the Divide  1921      Thomas Delmar  actor   \n",
       "3                          Revan  2012        Diego James  actor   \n",
       "4  Un homme marche dans la ville  1950       Fabien Loris  actor   \n",
       "\n",
       "        character   n  \n",
       "0  U.S.S. Soldier NaN  \n",
       "1            Dago   9  \n",
       "2            Dago   4  \n",
       "3            Dago NaN  \n",
       "4            Dago  12  "
      ]
     },
     "execution_count": 228,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "cast.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 243,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>year</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>The Core</td>\n",
       "      <td>2003</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>Il momento di uccidere</td>\n",
       "      <td>1968</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>Across the Divide</td>\n",
       "      <td>1921</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>Revan</td>\n",
       "      <td>2012</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>Un homme marche dans la ville</td>\n",
       "      <td>1950</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "                           title  year\n",
       "0                       The Core  2003\n",
       "1         Il momento di uccidere  1968\n",
       "2              Across the Divide  1921\n",
       "3                          Revan  2012\n",
       "4  Un homme marche dans la ville  1950"
      ]
     },
     "execution_count": 243,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "t = titles\n",
    "\n",
    "t.head()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 246,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>name</th>\n",
       "      <th>type</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th>character</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1964</th>\n",
       "      <th>Lady</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Kate Beswick</td>\n",
       "      <td>actress</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Lady</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Carol Teitel</td>\n",
       "      <td>actress</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"16\" valign=\"top\">2000</th>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Paul Ferriter</td>\n",
       "      <td>actor</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Paul Graham (IV)</td>\n",
       "      <td>actor</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Henry Griffin (II)</td>\n",
       "      <td>actor</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Ayun Halliday</td>\n",
       "      <td>actor</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Greg Kotis</td>\n",
       "      <td>actor</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Barry Manasch</td>\n",
       "      <td>actor</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Philip McKenney</td>\n",
       "      <td>actor</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Colin Puth</td>\n",
       "      <td>actor</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Giancarlo Roma</td>\n",
       "      <td>actor</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Thomas Roma</td>\n",
       "      <td>actor</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>D.J. Dara</td>\n",
       "      <td>actress</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Sinead Dolan</td>\n",
       "      <td>actress</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Sarah Fiol</td>\n",
       "      <td>actress</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Tanya Gingerich</td>\n",
       "      <td>actress</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Anne Nixon (II)</td>\n",
       "      <td>actress</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Special Guest Appearance</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>India Reed Kotis</td>\n",
       "      <td>actress</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>Gentleman</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Richard Sterne</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1969</th>\n",
       "      <th>First Player</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Roger Livesey</td>\n",
       "      <td>actor</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <th>First Player</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Ben Thom</td>\n",
       "      <td>actor</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>First Player</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Harcourt Williams</td>\n",
       "      <td>actor</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <th>Bernardo</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Matt Hurley (II)</td>\n",
       "      <td>actor</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>Bernardo</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Esmond Knight</td>\n",
       "      <td>actor</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1913</th>\n",
       "      <th>Bernardo</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>G. Richards (II)</td>\n",
       "      <td>actor</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1990</th>\n",
       "      <th>Bernardo</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Richard Warwick</td>\n",
       "      <td>actor</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>Bernardo</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Frederick Young</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <th>Laertes</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Hayden Adams</td>\n",
       "      <td>actor</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>Laertes</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Cullum</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1921</th>\n",
       "      <th>Laertes</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Anton De Verdier</td>\n",
       "      <td>actor</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>Lady of the Court</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Patricia Davidson (II)</td>\n",
       "      <td>actress</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>Fortinbras's Captain</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Dillon Evans</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1996</th>\n",
       "      <th>Fortinbras's Captain</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Jeffery Kissoon</td>\n",
       "      <td>actor</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Fortinbras's Captain</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Spencer-Churchill</td>\n",
       "      <td>actor</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <th>Polonia</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Gillian Bevan</td>\n",
       "      <td>actress</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1969</th>\n",
       "      <th>Court Lady</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Anjelica Huston</td>\n",
       "      <td>actress</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1996</th>\n",
       "      <th>Sailor One</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>David Yip</td>\n",
       "      <td>actor</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Young Hamlet</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Thomas Szekeres</td>\n",
       "      <td>actor</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1990</th>\n",
       "      <th>Palace Nobleman</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Barrie Holland</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>Player Prologue</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Hetherington</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1973</th>\n",
       "      <th>Claudius, King of Denmark</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Dan Hennessey</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>Spear Carrier</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Christopher Lee</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <th>Elsinore Courtier</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Anthony Maddalena</td>\n",
       "      <td>actor</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2000</th>\n",
       "      <th>Claudius' Bodyguard</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Wills Martin</td>\n",
       "      <td>actor</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>Laertes - His Son</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Terence Morgan (II)</td>\n",
       "      <td>actor</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1996</th>\n",
       "      <th>Old Norway</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Mills</td>\n",
       "      <td>actor</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Sailor Two</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Jimi Mistry</td>\n",
       "      <td>actor</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>Voice of Ghost</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Laurence Olivier</td>\n",
       "      <td>actor</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1913</th>\n",
       "      <th>Rosencrants</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Montagu Rutherford</td>\n",
       "      <td>actor</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1969</th>\n",
       "      <th>Court lady</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Jennifer Tudor</td>\n",
       "      <td>actress</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1948</th>\n",
       "      <th>Claudius - The King</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Basil Sydney</td>\n",
       "      <td>actor</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Horatio - His Friend</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Norman Wooland</td>\n",
       "      <td>actor</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <th>Hecuba</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Judi Dench</td>\n",
       "      <td>actress</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1921</th>\n",
       "      <th>Königin Gertrude</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Mathilde Brandt</td>\n",
       "      <td>actress</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">1996</th>\n",
       "      <th>Attendant to Gertrude</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Angela Douglas</td>\n",
       "      <td>actress</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Attendant to Gertrude</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Rowena King</td>\n",
       "      <td>actress</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>Attendant to Gertrude</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Sarah Lam</td>\n",
       "      <td>actress</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>Gertrude - The Queen</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Eileen Herlie</td>\n",
       "      <td>actress</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1973</th>\n",
       "      <th>Gertrude, Queen of Denmark</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Becke Keller</td>\n",
       "      <td>actress</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>Ophelia - and Daughter</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Jean Simmons</td>\n",
       "      <td>actress</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>299 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "                                  title                    name     type   n\n",
       "year character                                                              \n",
       "1964 Lady                        Hamlet            Kate Beswick  actress NaN\n",
       "     Lady                        Hamlet            Carol Teitel  actress NaN\n",
       "2000 Special Guest Appearance    Hamlet           Paul Ferriter    actor  23\n",
       "     Special Guest Appearance    Hamlet        Paul Graham (IV)    actor  27\n",
       "     Special Guest Appearance    Hamlet      Henry Griffin (II)    actor  28\n",
       "     Special Guest Appearance    Hamlet           Ayun Halliday    actor  30\n",
       "     Special Guest Appearance    Hamlet              Greg Kotis    actor  31\n",
       "     Special Guest Appearance    Hamlet           Barry Manasch    actor  32\n",
       "     Special Guest Appearance    Hamlet         Philip McKenney    actor  33\n",
       "     Special Guest Appearance    Hamlet              Colin Puth    actor  35\n",
       "     Special Guest Appearance    Hamlet          Giancarlo Roma    actor  37\n",
       "     Special Guest Appearance    Hamlet             Thomas Roma    actor  38\n",
       "     Special Guest Appearance    Hamlet               D.J. Dara  actress  21\n",
       "     Special Guest Appearance    Hamlet            Sinead Dolan  actress  22\n",
       "     Special Guest Appearance    Hamlet              Sarah Fiol  actress  25\n",
       "     Special Guest Appearance    Hamlet         Tanya Gingerich  actress  26\n",
       "     Special Guest Appearance    Hamlet         Anne Nixon (II)  actress  34\n",
       "     Special Guest Appearance    Hamlet        India Reed Kotis  actress  29\n",
       "1964 Gentleman                   Hamlet          Richard Sterne    actor NaN\n",
       "1969 First Player                Hamlet           Roger Livesey    actor  11\n",
       "1996 First Player                Hamlet                Ben Thom    actor  42\n",
       "1948 First Player                Hamlet       Harcourt Williams    actor   5\n",
       "2009 Bernardo                    Hamlet        Matt Hurley (II)    actor  10\n",
       "1948 Bernardo                    Hamlet           Esmond Knight    actor   2\n",
       "1913 Bernardo                    Hamlet        G. Richards (II)    actor  12\n",
       "1990 Bernardo                    Hamlet         Richard Warwick    actor  13\n",
       "1964 Bernardo                    Hamlet         Frederick Young    actor NaN\n",
       "2009 Laertes                     Hamlet            Hayden Adams    actor   7\n",
       "1964 Laertes                     Hamlet             John Cullum    actor NaN\n",
       "1921 Laertes                     Hamlet        Anton De Verdier    actor   7\n",
       "...                                 ...                     ...      ...  ..\n",
       "1948 Lady of the Court           Hamlet  Patricia Davidson (II)  actress NaN\n",
       "1964 Fortinbras's Captain        Hamlet            Dillon Evans    actor NaN\n",
       "1996 Fortinbras's Captain        Hamlet         Jeffery Kissoon    actor  27\n",
       "     Fortinbras's Captain        Hamlet  John Spencer-Churchill    actor  32\n",
       "2015 Polonia                     Hamlet           Gillian Bevan  actress   4\n",
       "1969 Court Lady                  Hamlet         Anjelica Huston  actress  18\n",
       "1996 Sailor One                  Hamlet               David Yip    actor  47\n",
       "     Young Hamlet                Hamlet         Thomas Szekeres    actor  41\n",
       "1990 Palace Nobleman             Hamlet          Barrie Holland    actor NaN\n",
       "1964 Player Prologue             Hamlet       John Hetherington    actor NaN\n",
       "1973 Claudius, King of Denmark   Hamlet           Dan Hennessey    actor NaN\n",
       "1948 Spear Carrier               Hamlet         Christopher Lee    actor NaN\n",
       "1996 Elsinore Courtier           Hamlet       Anthony Maddalena    actor NaN\n",
       "2000 Claudius' Bodyguard         Hamlet       John Wills Martin    actor  18\n",
       "1948 Laertes - His Son           Hamlet     Terence Morgan (II)    actor  16\n",
       "1996 Old Norway                  Hamlet              John Mills    actor  33\n",
       "     Sailor Two                  Hamlet             Jimi Mistry    actor  34\n",
       "1948 Voice of Ghost              Hamlet        Laurence Olivier    actor  13\n",
       "1913 Rosencrants                 Hamlet      Montagu Rutherford    actor   8\n",
       "1969 Court lady                  Hamlet          Jennifer Tudor  actress  23\n",
       "1948 Claudius - The King         Hamlet            Basil Sydney    actor  11\n",
       "     Horatio - His Friend        Hamlet          Norman Wooland    actor  14\n",
       "1996 Hecuba                      Hamlet              Judi Dench  actress  12\n",
       "1921 Königin Gertrude            Hamlet         Mathilde Brandt  actress   3\n",
       "1996 Attendant to Gertrude       Hamlet          Angela Douglas  actress  16\n",
       "     Attendant to Gertrude       Hamlet             Rowena King  actress  26\n",
       "     Attendant to Gertrude       Hamlet               Sarah Lam  actress  28\n",
       "1948 Gertrude - The Queen        Hamlet           Eileen Herlie  actress  12\n",
       "1973 Gertrude, Queen of Denmark  Hamlet            Becke Keller  actress NaN\n",
       "1948 Ophelia - and Daughter      Hamlet            Jean Simmons  actress  17\n",
       "\n",
       "[299 rows x 4 columns]"
      ]
     },
     "execution_count": 246,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = cast\n",
    "c = c[c.title == 'Hamlet']\n",
    "c = c.set_index(['year', 'character'])#.unstack('type')\n",
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 239,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div style=\"max-height:1000px;max-width:1500px;overflow:auto;\">\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th>title</th>\n",
       "      <th>name</th>\n",
       "      <th>character</th>\n",
       "      <th>n</th>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>year</th>\n",
       "      <th>type</th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "      <th></th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1964</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Kate Beswick</td>\n",
       "      <td>Lady</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Carol Teitel</td>\n",
       "      <td>Lady</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"16\" valign=\"top\">2000</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Paul Ferriter</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Paul Graham (IV)</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Henry Griffin (II)</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Ayun Halliday</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>30</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Greg Kotis</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>31</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Barry Manasch</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Philip McKenney</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Colin Puth</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>35</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Giancarlo Roma</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>37</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Thomas Roma</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>38</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>D.J. Dara</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>21</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Sinead Dolan</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>22</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Sarah Fiol</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>25</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Tanya Gingerich</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Anne Nixon (II)</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>India Reed Kotis</td>\n",
       "      <td>Special Guest Appearance</td>\n",
       "      <td>29</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Richard Sterne</td>\n",
       "      <td>Gentleman</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1969</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Roger Livesey</td>\n",
       "      <td>First Player</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Ben Thom</td>\n",
       "      <td>First Player</td>\n",
       "      <td>42</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Harcourt Williams</td>\n",
       "      <td>First Player</td>\n",
       "      <td>5</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Matt Hurley (II)</td>\n",
       "      <td>Bernardo</td>\n",
       "      <td>10</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Esmond Knight</td>\n",
       "      <td>Bernardo</td>\n",
       "      <td>2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1913</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>G. Richards (II)</td>\n",
       "      <td>Bernardo</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1990</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Richard Warwick</td>\n",
       "      <td>Bernardo</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Frederick Young</td>\n",
       "      <td>Bernardo</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2009</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Hayden Adams</td>\n",
       "      <td>Laertes</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Cullum</td>\n",
       "      <td>Laertes</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1921</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Anton De Verdier</td>\n",
       "      <td>Laertes</td>\n",
       "      <td>7</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Patricia Davidson (II)</td>\n",
       "      <td>Lady of the Court</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Dillon Evans</td>\n",
       "      <td>Fortinbras's Captain</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1996</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Jeffery Kissoon</td>\n",
       "      <td>Fortinbras's Captain</td>\n",
       "      <td>27</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Spencer-Churchill</td>\n",
       "      <td>Fortinbras's Captain</td>\n",
       "      <td>32</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2015</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Gillian Bevan</td>\n",
       "      <td>Polonia</td>\n",
       "      <td>4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1969</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Anjelica Huston</td>\n",
       "      <td>Court Lady</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1996</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>David Yip</td>\n",
       "      <td>Sailor One</td>\n",
       "      <td>47</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Thomas Szekeres</td>\n",
       "      <td>Young Hamlet</td>\n",
       "      <td>41</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1990</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Barrie Holland</td>\n",
       "      <td>Palace Nobleman</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1964</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Hetherington</td>\n",
       "      <td>Player Prologue</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1973</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Dan Hennessey</td>\n",
       "      <td>Claudius, King of Denmark</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Christopher Lee</td>\n",
       "      <td>Spear Carrier</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Anthony Maddalena</td>\n",
       "      <td>Elsinore Courtier</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2000</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Wills Martin</td>\n",
       "      <td>Claudius' Bodyguard</td>\n",
       "      <td>18</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Terence Morgan (II)</td>\n",
       "      <td>Laertes - His Son</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1996</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>John Mills</td>\n",
       "      <td>Old Norway</td>\n",
       "      <td>33</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Jimi Mistry</td>\n",
       "      <td>Sailor Two</td>\n",
       "      <td>34</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Laurence Olivier</td>\n",
       "      <td>Voice of Ghost</td>\n",
       "      <td>13</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1913</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Montagu Rutherford</td>\n",
       "      <td>Rosencrants</td>\n",
       "      <td>8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1969</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Jennifer Tudor</td>\n",
       "      <td>Court lady</td>\n",
       "      <td>23</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"2\" valign=\"top\">1948</th>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Basil Sydney</td>\n",
       "      <td>Claudius - The King</td>\n",
       "      <td>11</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actor</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Norman Wooland</td>\n",
       "      <td>Horatio - His Friend</td>\n",
       "      <td>14</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1996</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Judi Dench</td>\n",
       "      <td>Hecuba</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1921</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Mathilde Brandt</td>\n",
       "      <td>Königin Gertrude</td>\n",
       "      <td>3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th rowspan=\"3\" valign=\"top\">1996</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Angela Douglas</td>\n",
       "      <td>Attendant to Gertrude</td>\n",
       "      <td>16</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Rowena King</td>\n",
       "      <td>Attendant to Gertrude</td>\n",
       "      <td>26</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Sarah Lam</td>\n",
       "      <td>Attendant to Gertrude</td>\n",
       "      <td>28</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Eileen Herlie</td>\n",
       "      <td>Gertrude - The Queen</td>\n",
       "      <td>12</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1973</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Becke Keller</td>\n",
       "      <td>Gertrude, Queen of Denmark</td>\n",
       "      <td>NaN</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1948</th>\n",
       "      <th>actress</th>\n",
       "      <td>Hamlet</td>\n",
       "      <td>Jean Simmons</td>\n",
       "      <td>Ophelia - and Daughter</td>\n",
       "      <td>17</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>299 rows × 4 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "               title                    name                   character   n\n",
       "year type                                                                   \n",
       "1964 actress  Hamlet            Kate Beswick                        Lady NaN\n",
       "     actress  Hamlet            Carol Teitel                        Lady NaN\n",
       "2000 actor    Hamlet           Paul Ferriter    Special Guest Appearance  23\n",
       "     actor    Hamlet        Paul Graham (IV)    Special Guest Appearance  27\n",
       "     actor    Hamlet      Henry Griffin (II)    Special Guest Appearance  28\n",
       "     actor    Hamlet           Ayun Halliday    Special Guest Appearance  30\n",
       "     actor    Hamlet              Greg Kotis    Special Guest Appearance  31\n",
       "     actor    Hamlet           Barry Manasch    Special Guest Appearance  32\n",
       "     actor    Hamlet         Philip McKenney    Special Guest Appearance  33\n",
       "     actor    Hamlet              Colin Puth    Special Guest Appearance  35\n",
       "     actor    Hamlet          Giancarlo Roma    Special Guest Appearance  37\n",
       "     actor    Hamlet             Thomas Roma    Special Guest Appearance  38\n",
       "     actress  Hamlet               D.J. Dara    Special Guest Appearance  21\n",
       "     actress  Hamlet            Sinead Dolan    Special Guest Appearance  22\n",
       "     actress  Hamlet              Sarah Fiol    Special Guest Appearance  25\n",
       "     actress  Hamlet         Tanya Gingerich    Special Guest Appearance  26\n",
       "     actress  Hamlet         Anne Nixon (II)    Special Guest Appearance  34\n",
       "     actress  Hamlet        India Reed Kotis    Special Guest Appearance  29\n",
       "1964 actor    Hamlet          Richard Sterne                   Gentleman NaN\n",
       "1969 actor    Hamlet           Roger Livesey                First Player  11\n",
       "1996 actor    Hamlet                Ben Thom                First Player  42\n",
       "1948 actor    Hamlet       Harcourt Williams                First Player   5\n",
       "2009 actor    Hamlet        Matt Hurley (II)                    Bernardo  10\n",
       "1948 actor    Hamlet           Esmond Knight                    Bernardo   2\n",
       "1913 actor    Hamlet        G. Richards (II)                    Bernardo  12\n",
       "1990 actor    Hamlet         Richard Warwick                    Bernardo  13\n",
       "1964 actor    Hamlet         Frederick Young                    Bernardo NaN\n",
       "2009 actor    Hamlet            Hayden Adams                     Laertes   7\n",
       "1964 actor    Hamlet             John Cullum                     Laertes NaN\n",
       "1921 actor    Hamlet        Anton De Verdier                     Laertes   7\n",
       "...              ...                     ...                         ...  ..\n",
       "1948 actress  Hamlet  Patricia Davidson (II)           Lady of the Court NaN\n",
       "1964 actor    Hamlet            Dillon Evans        Fortinbras's Captain NaN\n",
       "1996 actor    Hamlet         Jeffery Kissoon        Fortinbras's Captain  27\n",
       "     actor    Hamlet  John Spencer-Churchill        Fortinbras's Captain  32\n",
       "2015 actress  Hamlet           Gillian Bevan                     Polonia   4\n",
       "1969 actress  Hamlet         Anjelica Huston                  Court Lady  18\n",
       "1996 actor    Hamlet               David Yip                  Sailor One  47\n",
       "     actor    Hamlet         Thomas Szekeres                Young Hamlet  41\n",
       "1990 actor    Hamlet          Barrie Holland             Palace Nobleman NaN\n",
       "1964 actor    Hamlet       John Hetherington             Player Prologue NaN\n",
       "1973 actor    Hamlet           Dan Hennessey   Claudius, King of Denmark NaN\n",
       "1948 actor    Hamlet         Christopher Lee               Spear Carrier NaN\n",
       "1996 actor    Hamlet       Anthony Maddalena           Elsinore Courtier NaN\n",
       "2000 actor    Hamlet       John Wills Martin         Claudius' Bodyguard  18\n",
       "1948 actor    Hamlet     Terence Morgan (II)           Laertes - His Son  16\n",
       "1996 actor    Hamlet              John Mills                  Old Norway  33\n",
       "     actor    Hamlet             Jimi Mistry                  Sailor Two  34\n",
       "1948 actor    Hamlet        Laurence Olivier              Voice of Ghost  13\n",
       "1913 actor    Hamlet      Montagu Rutherford                 Rosencrants   8\n",
       "1969 actress  Hamlet          Jennifer Tudor                  Court lady  23\n",
       "1948 actor    Hamlet            Basil Sydney         Claudius - The King  11\n",
       "     actor    Hamlet          Norman Wooland        Horatio - His Friend  14\n",
       "1996 actress  Hamlet              Judi Dench                      Hecuba  12\n",
       "1921 actress  Hamlet         Mathilde Brandt            Königin Gertrude   3\n",
       "1996 actress  Hamlet          Angela Douglas       Attendant to Gertrude  16\n",
       "     actress  Hamlet             Rowena King       Attendant to Gertrude  26\n",
       "     actress  Hamlet               Sarah Lam       Attendant to Gertrude  28\n",
       "1948 actress  Hamlet           Eileen Herlie        Gertrude - The Queen  12\n",
       "1973 actress  Hamlet            Becke Keller  Gertrude, Queen of Denmark NaN\n",
       "1948 actress  Hamlet            Jean Simmons      Ophelia - and Daughter  17\n",
       "\n",
       "[299 rows x 4 columns]"
      ]
     },
     "execution_count": 239,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "c = cast\n",
    "c = c[c.title == 'Hamlet']\n",
    "c = c.set_index(['year', 'type'])#.unstack('type')\n",
    "c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {
    "collapsed": true
   },
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.4.3"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
